You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lost remote after 10000ms - Issue connecting to zerorpc server after packaging python #28
After packaging the python executable with Pyinstaller, I suddenly have issues with the zerorpc server. It appears that my issue comes after execFile the python executable. I'm able to create the pyprocess, but it isn't able to connect to the python script as it did before when it was just spawning off the script.
This is the exact error:
D:_\pyCal\renderer.js:14 Error: Lost remote after 10000ms
at Object.createErrorResponse
(D:_\pyCal\node_modules\zerorpc\lib\util.js:53)
at ClientChannel.
(D:_\pyCal\node_modules\zerorpc\lib\client.js:163)
at emitOne (events.js:96)
at ClientChannel.emit (events.js:191)
at D:_\pyCal\node_modules\zerorpc\lib\channel.js:198
client.invoke @ D:_\pyCal\renderer.js:14
callbackErrorWrapper @ D:_\pyCal\node_modules\zerorpc\lib\client.js:105
(anonymous) @ D:_\pyCal\node_modules\zerorpc\lib\client.js:164
emitOne @ events.js:96
emit @ events.js:191
(anonymous) @ D:_\pyCal\node_modules\zerorpc\lib\channel.js:198
I appreciate all the effort and hardwork put in by you @fyears . This is a great open source project and is quite helpful.
I am getting the same error as mentioned above except after i package the app, it is not able to connect to the server. Do you have any suggestions for this ? @fyears
I compared an old working package to a newer one that didn't work, and noticed that some folders and files were missing. I'm not sure which of the following fixed it for me, but here's what I did:
Uninstalled every other python version that I had
Reinstalled Python 3.6.3, installed it for every user and chose to install pip, tcl, tkinter, with precompiled standard library
Reinstalled all the other libraries with pip, such as pyinstaller, requests, etc
Reinstalled pypiwin32 with pip
For reference, here's a comparison between a working and non working file/folder structure
I also experienced this issue when completing the tutorial with Windows 10.
The specific problem I experienced was with the .bind method. The python program (bundled as an .exe file with pyinstaller) stopped immediately without logging any errors when it called the .bind method.
When I used pdb.set_trace() to debug the issue, this is what I found when stepping through the program:
> .\dist\add\add.exe 4242
> c:\users\tram ngo\desktop\src\electron-python\add.py(14)main()
-> s.bind(addr)
(Pdb) s
--Call--
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\socket.py(42)bind()
(Pdb) s
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\socket.py(43)bind()
(Pdb) s
--Call--
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(322)bind()
(Pdb) s
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(323)bind()
(Pdb) s
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(324)bind()
(Pdb) s
--Call--
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(305)_resolve_endpoint()
(Pdb) list
[EOF]
(Pdb) n
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(306)_resolve_endpoint()
(Pdb) list
[EOF]
(Pdb) n
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(307)_resolve_endpoint()
(Pdb) n
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(308)_resolve_endpoint()
(Pdb) n
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(313)_resolve_endpoint()
(Pdb) n
--Return--
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(313)_resolve_endpoint()->['tcp://127.0.0.1:4242']
(Pdb) list
[EOF]
(Pdb) n
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(325)bind()
(Pdb) s
> c:\users\tram ngo\desktop\src\electron-python\site-packages\zerorpc\events.py(326)bind()
How I fixed it:
Originally I used Python 2.7 to install Zerorpc and pyinstaller. When I switched to Python 3.7 (in a virtualenv), it worked! I'm not sure why upgrading python version fixed the issue.
Activity
jhampl commentedon Aug 3, 2018
Same problem here.
rishantagarwal commentedon Sep 7, 2018
I appreciate all the effort and hardwork put in by you @fyears . This is a great open source project and is quite helpful.
I am getting the same error as mentioned above except after i package the app, it is not able to connect to the server. Do you have any suggestions for this ? @fyears
rishantagarwal commentedon Sep 7, 2018
I tried running the executable directly and it fails with error

kamranIoTDeveloper commentedon Apr 15, 2019
I am also getting same issue, it seems zerorpc don't work in exe file. Anyone found solution?
brainytwoo commentedon Jun 19, 2019
Not sure if the issue is exactly the same but I was getting the same error. I fixed it by installing zerorpc via pip.
pip install zerorpctepsukka commentedon Nov 1, 2019
I compared an old working package to a newer one that didn't work, and noticed that some folders and files were missing. I'm not sure which of the following fixed it for me, but here's what I did:
For reference, here's a comparison between a working and non working file/folder structure
WORKING (Python 3.6.3)
NOT WORKING (Python 3.8)
WORKING AFTER REINSTALLATION (Python 3.6.3)
tramngo1603 commentedon Dec 9, 2019
I also experienced this issue when completing the tutorial with Windows 10.
The specific problem I experienced was with the
.bindmethod. The python program (bundled as an.exefile withpyinstaller) stopped immediately without logging any errors when it called the.bindmethod.When I used
pdb.set_trace()to debug the issue, this is what I found when stepping through the program:How I fixed it:
Originally I used Python 2.7 to install
Zerorpcandpyinstaller. When I switched to Python 3.7 (in avirtualenv), it worked! I'm not sure why upgrading python version fixed the issue.