Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed import issue with bottle_websocket #731

Closed
wants to merge 1 commit into from

Conversation

chetankochiyaniya
Copy link

Issue Summary:

When attempting to use the eel library in a Windows 11 environment with Python 3.12.0, I encountered an error where eel is unable to find the bottle.ext.websocket module, even though bottle-websocket is correctly installed in the Python environment.

Reproducible Example:

Minimal example demonstrating the issue

import eel

eel.init("web")
eel.start("index.html")

Expected Behavior:

I expected the script to run without errors and display the web application defined in index.html.

Actual Behavior:

Encountered the following error:

Traceback (most recent call last):
 File "main.py", line 1, in <module>
 import eel
 File "C:\Users\Chetan\AppData\Local\Programs\Python\Python312\Lib\site-packages\eel\__init__.py", line 16, in <module>
 import bottle.ext.websocket as wbs
ModuleNotFoundError: No module named 'bottle.ext.websocket'

Environment Details:

Operating System: Windows 11
Python Version: 3.12.0
eel Version: 0.16.0
bottle Version: 0.12.25
bottle-websocket Version: 0.2.9

Steps to Reproduce:

Install eel, bottle, and bottle-websocket using pip.
Run the provided Python script in the specified environment.

Additional Information:

I have tried a workaround by manually modifying the init.py file in the eel package to import bottle_websocket directly, which resolved the issue temporarily.

Additional Testing:

I also tested the script on
Operating System: Windows 10
Python Version: 3.9.0
eel Version: 0.16.0
bottle Version: 0.12.25
bottle-websocket Version: 0.2.9
In both cases, the following imports worked successfully:
import bottle_websocket as wbs
# or
import bottle.ext.websocket as wbs

@samuelhwilliams
Copy link
Collaborator

Closing in favour of #725, which I saw first. This is the same issue. Thanks for contributing though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants