Closed MartinThoma closed 4 years ago
Try onedir, instead of onefile and see if it works then
Hi @MartinThoma - did you get to the bottom of this?
If not, try deleting the dist
directory and rebuilding. I think I hit a similar thing today.
I'll close this for now to try to keep things tidy - but if you are still having the problem, just reply and we can take another look.
Huh, weird. It works.
Eel==0.12.3
PyInstaller==3.6
There is an issue with the executable. It seems as if not all files were included:
./main
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
File "site-packages/eel/__init__.py", line 257, in _process_message
File "main.py", line 43, in worker
File "site-packages/hwrt/classify.py", line 92, in classify_segmented_recording
File "site-packages/hwrt/classify.py", line 28, in __init__
File "site-packages/hwrt/utils.py", line 451, in load_model
File "tarfile.py", line 1599, in open
File "tarfile.py", line 1664, in gzopen
File "gzip.py", line 173, in __init__
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIFW6rbP/hwrt/misc/model.tar'
2020-06-18T21:06:35Z <Greenlet at 0x7fac5eff6040: _process_message({'call': 1.8640561829231295, 'name': 'worker', 'ar, <geventwebsocket.websocket.WebSocket object at 0x7)> failed with FileNotFoundError
You may need to build it without the --onefile
flag and check that all the files/packages/libs that your app needs are being collected by pyinstaller correctly. Sometimes, I think, it can miss things. This feels like what's happening - it can't find model.tar
.
The PyInstaller docs should help you include extra files you need. https://pyinstaller.readthedocs.io/en/stable/operating-mode.html#analysis-finding-the-files-your-program-needs
Sorry, I haven't seen your answer before I posted the other issue. In between, I tried it like this but I failed - but you helped me: https://github.com/samuelhwilliams/Eel/issues/331 🎉
Eel version
Describe the bug I wanted to build a distributable binary as described in the docs. I got TODO.
To Reproduce Steps to reproduce the behavior:
Expected behavior I thought I would either get an exe file (e.g. when this distributable is for Windows) or a
.tar.gz
/.deb
(when it's for Linux)Desktop (please complete the following information):
Ubuntu 20.04 LTS
Google Chrome
Version 81.0.4044.138
Additional context The documentation is not clear if this is OS specific and which OS it is for.