No module named 'bottle-websocket' when running an executable made with PyInstaller, including Eel module
See original GitHub issueI Made a simple program, tried to make an executable out of it via PyInstaller. No errors whatsoever, but when running this executable it crashes on the first line - import eel, telling - there is no module called ‘bottle-websocket’.
I checked pip: eel, bottle-websocket are installed. Can’t figure out what’s the problem. Runs perfectly as a raw python file, but when executed throws this weird error. Attachments:
main.py:
import eel
import sys
def getcurrentdir():
a = sys.argv[0].split("\\")
currentdir = ''
for i in range(len(a) - 1):
currentdir += a[i] + "\\"
return currentdir
eel.init(getcurrentdir + "\\web")
eel.start('main.html', block=False)
while True:
eel.sleep(10)
Error: CMD error
I found this in PyInstaller Warning file:
bottle.ext' MissingModule
imported by: eel
Issue Analytics
- State:
- Created 5 years ago
- Comments:16
Top Results From Across the Web
Python: no module named 'bottle-websocket' when running an ...
this command will get the 'bottle-websocket' work and will make sure that it complies with the web folder and files.
Read more >No module named 'bottle-websocket' when running ... - GitHub
I Made a simple program, tried to make an executable out of it via PyInstaller. No errors whatsoever, but when running this executable...
Read more >Python: no module named 'bottle-websocket' when running an ...
Made a simple program, tried to make an executable out of it via PyInstaller. No errors whatsoever, but when running this executable it...
Read more >Pyinstaller: Module not found when running .exe when ...
This works find in PyCharm, but when I produce a Windows exe using PyInstaller it errors at runtime: .\pyinst_excel.exe Traceback (most recent call...
Read more >python pyinstaller/auto-py-to-exe 打包失敗 - iT 邦幫忙
python pyinstaller/auto-py-to-exe 打包失敗. python. pyinstaller ... 已經安裝了但是還是會依直出現No module named XXX ... 6301 INFO: Including run-time hook ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To those who are still facing this issue. A probably not optimal way to fix it is to import bottle?websocket in your main file. so do something like: import eel import bottle_websocket
eel.init(‘web’) eel.start(‘main.html’)
Hi, I was actually following the tutorial until it threw some errors about a web folder not being empty. Now I tried with the empty web folder and it worked, thanks.