Piiii31 / Language-directory-finder

0 stars 0 forks source link

ModuleNotFoundError: No module named 'bottle.ext.websocket' #1

Open HamzaGbada opened 1 week ago

HamzaGbada commented 1 week ago

I just followed the instructioon from README.md, however it does not work and throw the following error:

Traceback (most recent call last):
  File "/home/user/PycharmProjects/Language-directory-finder/main.py", line 4, in <module>
    import eel
  File "/home/user/PycharmProjects/Language-directory-finder/venv/lib/python3.12/site-packages/eel/__init__.py", line 16, in <module>
    import bottle.ext.websocket as wbs
ModuleNotFoundError: No module named 'bottle.ext.websocket'

General information

Piiii31 commented 6 days ago

Workaround (Outdated)

Fortunately, bottle-websocket can be used and should work similarly. I got mine working with Python 3.12.

You just need to change an import in __init__.py in the Eel module.

Find this line:

import bottle.ext.websocket as wbs

and replace it with:

import bottle_websocket as wbs

Make sure to update the required packages:

pip install --upgrade bottle-websocket setuptools
HamzaGbada commented 6 days ago

image

(Note: your answer is generated using chatgpt :) )

Piiii31 commented 6 days ago

I just formated here is the original: https://stackoverflow.com/questions/77232001/python-eel-module-unable-to-use-import-bottle-ext-websocket-as-wbs-modulenotfoun

Piiii31 commented 5 days ago

its fixed now

HamzaGbada commented 5 days ago

I don't think so: Here is an update if current issue:

Traceback (most recent call last):
  File "/home/bobmarley/PycharmProjects/Language-directory-finder/venv/lib/python3.12/site-packages/eel/__init__.py", line 319, in _process_message
    return_val = _exposed_functions[message['name']](*message['args'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bobmarley/PycharmProjects/Language-directory-finder/main.py", line 53, in list_directories
    directories = scan_directories(drive, language)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bobmarley/PycharmProjects/Language-directory-finder/main.py", line 38, in scan_directories
    with os.scandir(drive) as entries:
         ^^^^^^^^^^^^^^^^^
NotADirectoryError: [Errno 20] Not a directory: '/dev/nvme0n1p3'

I think, it does not recognize my nvme drive.