Script working in Scripting Console but not on action preformed for button

Hello all,

I am setting up a project to go and grab a bunch of financial data from a banking website.

The way I have it worked out is I have a .exe file on my system that I am using the SubProcess module to activate via python.

Here's the code:
"""import subprocess

file = "C:\Users\Kyle\Desktop\pyFinanceData\dbConnector.exe", shell=True) """

Whenever I run this via the Scripting console it works perfect 100% of the time.

But I bound it to a button and now it doesn't work. I tried binding it to a gateway message handler, and using the button to call that, and that also did not work.

I'm not sure why it would ONLY be working in the Scripting Console. Any advice would be really helpful.

The Script Console is executing on your local machine.

Scripting in Perspective, even in the Designer, is being executed on the gateway.

1 Like

Thank you.

So then would I have to set up the permissions for the gateway? Or is there a way to get the button somehow working on my local machine?

Perspective cannot run arbitrary executables locally. Browsers do not permit that--it would be an enormous security hole. Your gateway needs to run that tool, or you need to figure out how it works and re-create it with

Or use Vision instead of Perspective. It would run the tool locally.

1 Like