Comments (3)
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.
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.
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)
- python virtualenv HOT 3
- No handlers could be found for logger "zerorpc.channel" HOT 1
- getting node version mismatch on zerorpc HOT 4
- Update `package.json` for packaging as application HOT 2
- zerorpc is not included while packaging HOT 9
- Module mismatch following readme instructions HOT 4
- How to use the latest electron HOT 1
- After packaged the Electron project, which directory should I put in of my packaged python file? HOT 2
- How do I inckude
- How do I include Sqlite3 to my Python and electron.js Application HOT 1
- Lost remote after 10000ms - Issue connecting to zerorpc server after packaging python HOT 7
- Module parse failed HOT 1
- Instructions for Windows fails HOT 2
- Installation Issue - electron version problem
- npm install fails HOT 1
- How to call javascript from python
- repo https://github.com/fyears/zerorpc-node.git is gone HOT 3
- running python threads
- npm install fails on Windows 11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-python-example.