Giter VIP home page Giter VIP logo

Comments (3)

humphd avatar humphd commented on June 1, 2024

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.

from electron-python-example.

cipiasentini avatar cipiasentini commented on June 1, 2024

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!

from electron-python-example.

fyears avatar fyears commented on June 1, 2024

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!

from electron-python-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.