bless icon indicating copy to clipboard operation
bless copied to clipboard

no module error pysetupdi

Open h-enes-simsek opened this issue 1 year ago • 4 comments

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?

h-enes-simsek avatar Mar 19 '23 12:03 h-enes-simsek

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

aahmed7 avatar Mar 20 '23 14:03 aahmed7

Thank you for your reply. I think it would be helpful to have your answer in the readme file.

h-enes-simsek avatar Mar 20 '23 18:03 h-enes-simsek

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.

kevincar avatar Mar 20 '23 19:03 kevincar

If you run pip install git+https://github.com/gwangyi/pysetupdi it clones and installs in one command.

NotLawson avatar Jul 01 '24 00:07 NotLawson