Giter VIP home page Giter VIP logo

Comments (3)

justxi avatar justxi commented on August 20, 2024

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.

SvyatoslavNovikov avatar SvyatoslavNovikov commented on August 20, 2024

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.

SvyatoslavNovikov avatar SvyatoslavNovikov commented on August 20, 2024

Following this issue #3 I downgrade python to 3.6.8 and use next envirement:
Settings 2021-01-18 22 21 13
but i have same stacktrace.

from bricknil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.