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

add_advertisment_status_changed error on Windows for example server #99

Open
Rhynorater opened this issue Nov 28, 2022 · 5 comments
Open

Comments

@Rhynorater
Copy link

The problem
When I run the server from the example, I get the below error:

PS C:\Users\Justin\Windows Scripts> python .\ble.py
C:\Users\Justin\Windows Scripts\ble.py:91: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
DEBUG:asyncio:Using proactor: IocpProactor
DEBUG:bless.backends.winrt.server:Creating a new service with uuid: A07498CA-AD5B-474E-940D-16F1FBE7E8CD
DEBUG:bless.backends.winrt.server:Adding service to server with uuid A07498CA-AD5B-474E-940D-16F1FBE7E8CD
Traceback (most recent call last):
  File "C:\Users\Justin\Windows Scripts\ble.py", line 92, in <module>
    loop.run_until_complete(run(loop))
  File "C:\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
    return future.result()
  File "C:\Users\Justin\Windows Scripts\ble.py", line 53, in run
    await server.add_new_service(my_service_uuid)
  File "C:\Python\Python310\lib\site-packages\bless-0.2.4-py3.10.egg\bless\backends\winrt\server.py", line 167, in add_new_service
  File "C:\Python\Python310\lib\site-packages\bless-0.2.4-py3.10.egg\bless\backends\winrt\service.py", line 53, in init
AttributeError: 'NoneType' object has no attribute 'add_advertisement_status_changed'

Reproduction
Windows 11
Python 3.10.5
Run:

python -m pip install bless
python server.py

Expected behavior
It would run successfully.

@Laura-VFA
Copy link

I have the same problem, did anyone solve it? I would appreciate it :)

@kevincar
Copy link
Owner

kevincar commented Sep 2, 2023

@Laura-VFA Is this with the latest version too (v0.2.5)?

@Laura-VFA
Copy link

Yes, I have the bless==0.2.5 version

@Jnp95
Copy link

Jnp95 commented Aug 27, 2024

Same problem with bless==0.2.6 version 😞

@Jnp95
Copy link

Jnp95 commented Aug 27, 2024

My Solution :

Think to activate the Bluetooth on Windows :

Capture d'écran 2024-08-27 131223

And I suppose you need to be admin on your machine.

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

No branches or pull requests

4 participants