Closed cipiasentini closed 6 years ago
Yeah, I was hitting the same thing. I eventually got it working by altering the path that was being used to the Python script. A good way to test that you have things working is to manually run your Python server.py
in one terminal, and then alter your Electron app to skip starting the child_process
, and just try to connect to the running server. If that works, then it's just a matter of getting your code to send the right script path to the server.py
file in your JS.
Thanks for the response, but the path is correct. I've done a console log of the getScriptPath()
function and returns the correct path to the server. What I am not able to understand is how zerorpc works, because there almost no documentation, according to the webpage examples I observe that there are 2 parts missing in this project (or at least I wasn't able to identify them):
The nodejs server part. (also I don't know why but the server uses "tcp://0.0.0.0:4242" as address but here we use the localhost address)
And the python client part.
What I want to achieve is super simple, just take 5 inputs of a form, do the python processing and then display the content of a text file returned by the python api (if possible asynchronously so that when theres a new line added to the output file it automatically updates the textbox). But I'm not able to do even the simple echo test because of this problem
---EDIT---
After some debugging apparently there was an error on my python program which was not letting the rest of the code execute. Now it the connection to the server is possible :D. Thanks!
Hi, sorry for the very late reply.
So it seems like the issue had been solved? I close this issue then.
I am glad that my post had helped you!
Hi, I've been trying to fix a problem but I am not able to do it. I don't know why everything is just like your solution. I've also set up the env variables. I leave my repo in case you need to see the code, thanks so much https://github.com/cipiasentini/asrulpy.git