quaxalber/bluetooth_2_usb

issue with step 9

Closed this issue · 4 comments

Hi, I've followed the steps as described, I'm using an rpi 0w, with the 32bit installation, and I'm having issues with this step. I've started fresh a couple of times, and I've tried looking in the files/ the code, but I haven't seen anything that would help resolve the following issue: when I put in "python3.11 bluetooth_2_usb.py -l" I'm getting the following error. I've tried just guessing, but that hasn't solved anything, not sure if any of the steps above got messed up or not.

Traceback (most recent call last):
  File "/home/user/bluetooth_2_usb/bluetooth_2_usb.py", line 30, in <module>
    from evdev import (
  File "/home/user/bluetooth_2_usb/submodules/python-evdev/evdev/__init__.py", line 5, in <module>
    from evdev.device import DeviceInfo, InputDevice, AbsInfo, EvdevError
  File "/home/user/bluetooth_2_usb/submodules/python-evdev/evdev/device.py", line 8, in <module>
    from evdev import _input, ecodes, util
  File "/home/user/bluetooth_2_usb/submodules/python-evdev/evdev/ecodes.py", line 44, in <module>
    from evdev import _ecodes
ImportError: cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/user/bluetooth_2_usb/submodules/python-evdev/evdev/__init__.py)

Hi, @1-lost-cause!

It's a known issue, #42. I've workarounded it with sudo apt install python3-evdev.

Hi @1-lost-cause

Thanks for reporting the issue. I have just merged a PR that should fix this. I have tried with a RPi 4B to follow the installation instructions from scratch and it worked for me.

Please see if it works for 0W as well. I have updated the readme too. I would recommend to start afresh with step 6.

Curious for your feedback.

Cheers

Using a 0w, I've got it to work with the solution that ig-sinicyn provided! Thank you!

Cool, great to hear. Closing this one then.

Thanks @ig-sinicyn for assistance!