bless
bless copied to clipboard
no module error pysetupdi
The problem
I tried to run the server.py and got the following error:
(VENV) redacted>python server.py
Traceback (most recent call last):
File "redacted\Desktop\bluetoothTest\server.py", line 12, in <module>
from bless import ( # type: ignore
File "redacted\Desktop\bluetoothTest\bless\VENV\lib\site-packages\bless\__init__.py", line 41, in <module>
from bless.backends.winrt.server import ( # noqa: F401
File "redacted\Desktop\bluetoothTest\bless\VENV\lib\site-packages\bless\backends\winrt\server.py", line 20, in <module>
from bless.backends.winrt.ble import BLEAdapter
File "redacted\Desktop\bluetoothTest\bless\VENV\lib\site-packages\bless\backends\winrt\ble\__init__.py", line 1, in <module>
from .adapter import BLEAdapter
File "redacted\Desktop\bluetoothTest\bless\VENV\lib\site-packages\bless\backends\winrt\ble\adapter.py", line 5, in <module>
from pysetupdi import devices # type: ignore
Reproduction
I created a new venv pip install bleak pip install bless python server.py
Desktop (please complete the following information): Win10
Additional context There is no lib called pysetupdi in PYPI, did you install it manually?
pysetupdi is not available on pypi and needs to be installed manually from https://github.com/gwangyi/pysetupdi
clone the repo and run the following command:
python .\setup.py install
Thank you for your reply. I think it would be helpful to have your answer in the readme file.
Thanks for bringing this up. I'm going to keep this open for my records to remind me to update the code. As @h-enes-simsek pointed out, this should either be in the readme or ideally I'll update the setup.py to ensure this is installed during pip install
on windows OS.
If you run pip install git+https://github.com/gwangyi/pysetupdi
it clones and installs in one command.