Comments (3)
Hi, looking at the release notes of bleak 0.10.0 (https://github.com/hbldh/bleak/releases), there is the information "Removed separate implementation of global discover method". Maybe this is related to your problem? You could try to downgrade your "bleak" version to 0.9.1. I am using bleak 0.6.1 and it works so far. If you will use something newer with success, please let me know.
from bricknil.
Yes, i downgrade bleak to 0.9.1 version and have new stacktrace:
DEBUG:asyncio:Using selector: SelectSelector
INFO:BLE Event Q.0:using bleak
DEBUG:Vernie.3:Decorating class Robot with ExternalMotor
DEBUG:Vernie.3:Decorating class Robot with LED
INFO:BLE Event Q.0:Starting scan for UART
INFO:BLE Event Q.0:ble_id **my:hub:mac:here** is not a parseable UUID, so assuming it's a BLE network addresss
INFO:BLE Event Q.0:Looking for specific hub id **my:mac:here**
started thread for curio
inside curio run loop
Awaiting on bleak discover
DEBUG:bleak.backends.dotnet.discovery:Received **not:my:mac:here**: Unknown.
DEBUG:bleak.backends.dotnet.discovery:Received **my:hub:mac:here**: Unknown.
DEBUG:bleak.backends.dotnet.discovery:Received **my:hub:mac:here**: LEGO Move Hub.
DEBUG:bleak.backends.dotnet.discovery:Received **my:hub:mac:here**: Unknown.
DEBUG:bleak.backends.dotnet.discovery:Received **my:hub:mac:here**: LEGO Move Hub.
DEBUG:bleak.backends.dotnet.discovery:Received **not:my:mac:here**: Unknown.
ERROR:curio.kernel:Task Crash: Task(id=7, name='BLEventQ.connect', state='TERMINATED')
Traceback (most recent call last):
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\kernel.py", line 737, in kernel_run
trap = current.send(current._trap_result)
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\task.py", line 167, in send
return self._send(value)
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\task.py", line 171, in _task_runner
return await coro
File "C:\Users\NovikovS\AppData\Roaming\Python\Python37\site-packages\bricknil\ble_queue.py", line 228, in connect
await self._ble_connect(hub.uart_uuid, hub.ble_name, hub.manufacturer_id, ble_id)
File "C:\Users\NovikovS\AppData\Roaming\Python\Python37\site-packages\bricknil\ble_queue.py", line 171, in _ble_connect
devices = [d for d in devices if str(uart_uuid) in d.uuids]
File "C:\Users\NovikovS\AppData\Roaming\Python\Python37\site-packages\bricknil\ble_queue.py", line 171, in <listcomp>
devices = [d for d in devices if str(uart_uuid) in d.uuids]
AttributeError: 'BLEDevice' object has no attribute 'uuids'
INFO:BLE Event Q.0:Terminating and disconnecxting
INFO:root:quitting
Exception in thread Thread-1:
Traceback (most recent call last):
Done Awaiting on bleak discover
quitting
quit
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\kernel.py", line 737, in kernel_run
trap = current.send(current._trap_result)
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\task.py", line 167, in send
return self._send(value)
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\task.py", line 171, in _task_runner
return await coro
File "C:\Users\NovikovS\AppData\Roaming\Python\Python37\site-packages\bricknil\ble_queue.py", line 228, in connect
await self._ble_connect(hub.uart_uuid, hub.ble_name, hub.manufacturer_id, ble_id)
File "C:\Users\NovikovS\AppData\Roaming\Python\Python37\site-packages\bricknil\ble_queue.py", line 171, in _ble_connect
devices = [d for d in devices if str(uart_uuid) in d.uuids]
File "C:\Users\NovikovS\AppData\Roaming\Python\Python37\site-packages\bricknil\ble_queue.py", line 171, in <listcomp>
devices = [d for d in devices if str(uart_uuid) in d.uuids]
AttributeError: 'BLEDevice' object has no attribute 'uuids'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\NovikovS\AppData\Roaming\Python\Python37\site-packages\bricknil\bricknil.py", line 191, in _curio_event_run
run(_run_all(ble, system), with_monitor=False)
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\kernel.py", line 823, in run
return kernel.run(corofunc, *args)
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\kernel.py", line 173, in run
raise ret_exc
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\kernel.py", line 737, in kernel_run
trap = current.send(current._trap_result)
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\task.py", line 167, in send
return self._send(value)
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\task.py", line 171, in _task_runner
return await coro
File "C:\Users\NovikovS\AppData\Roaming\Python\Python37\site-packages\bricknil\bricknil.py", line 138, in _run_all
await task_connect.join()
File "C:\Users\NovikovS\AppData\Local\Programs\Python\Python37\lib\site-packages\curio\task.py", line 187, in join
raise TaskError('Task crash') from self.exception
curio.errors.TaskError: Task crash
Process finished with exit code 0
I don't understand, what exactly is going on.
from bricknil.
Following this issue #3 I downgrade python to 3.6.8 and use next envirement:
but i have same stacktrace.
from bricknil.
Related Issues (20)
- ModuleNotFoundError: No module named 'Windows' HOT 3
- I want to have multiple functions to control the Lego hub motors not Just the run() function
- Documentation clarification - Windows USB adapter support HOT 1
- Hub disconnects on first write?
- crashes one first communication with boost sensor HOT 3
- ID of sensors inside Technic Plus Hub HOT 3
- Minor changes to make it works with bleak 0.6.4 HOT 9
- Dashboard & API
- Technic Control+ Hub gets disconnected on "notify" (raspberry pi 4) HOT 2
- Not able to run lego passenger train due to Bleak error
- Duplo Train - Bricknil Traceback Crash HOT 7
- Train Hub not advertised/connected HOT 1
- Support for Large Technic Motor (88013), e.g. for Lego Crocodile (10277) HOT 2
- Cannot connect to Large Angular Motor for a Technic Hub set HOT 1
- Controlling 2 Train motors in a hub
- Bluetooth discovery sometimes errors out
- Windows 11: Bleak discover has an exception: Unhandled Exception: System.NotSupportedException: Cannot create uninitialized instances of types requiring managed activation.
- Raspberry Pi: Software caused connection abort HOT 1
- MicroPython support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bricknil.