Giter Club home page Giter Club logo

Comments (3)

devbis avatar devbis commented on August 19, 2024 1

It is an issue in the underlying library. Here is the corresponding PR NotJustAToy/aio-mqtt#4 but it is not approved yet

from ble2mqtt.

duylong avatar duylong commented on August 19, 2024

Hi,

I changed /root/.local/lib/python3.10/site-packages/aio_mqtt/client.py with your PR, but same issue, no work with Python 3.10:

INFO:ble2mqtt.__main__:Starting BLE2MQTT version 0.1.0a47
ERROR:ble2mqtt.ble2mqtt:Connection lost. Will retry in 10 seconds.
Traceback (most recent call last):
  File "/root/.local/lib/python3.10/site-packages/ble2mqtt/ble2mqtt.py", line 881, in _connect_forever
    mqtt_connection = await self._mqtt_client.connect(
  File "/root/.local/lib/python3.10/site-packages/aio_mqtt/client.py", line 207, in connect
    self._reader, self._writer = await aio.open_connection(
  File "/usr/local/lib/python3.10/asyncio/streams.py", line 47, in open_connection
    transport, _ = await loop.create_connection(
TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'loop'
ERROR:ble2mqtt.ble2mqtt:Disconnect from MQTT broker error
WARNING:ble2mqtt.ble2mqtt:Error on MQTT  disconnecting: ConnectionClosedError()
Traceback (most recent call last):
  File "/root/.local/bin/ble2mqtt", line 8, in <module>
    sys.exit(main())
  File "/root/.local/lib/python3.10/site-packages/ble2mqtt/__main__.py", line 140, in main
    aio.run(amain(config), debug=(config['log_level'].upper() == 'DEBUG'))
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/root/.local/lib/python3.10/site-packages/ble2mqtt/__main__.py", line 108, in amain
    await service.start()
  File "/root/.local/lib/python3.10/site-packages/ble2mqtt/ble2mqtt.py", line 688, in start
    await t
  File "/root/.local/lib/python3.10/site-packages/ble2mqtt/ble2mqtt.py", line 726, in _handle_messages
    async for message in self._mqtt_client.delivered_messages(
  File "/root/.local/lib/python3.10/site-packages/aio_mqtt/client.py", line 324, in delivered_messages
    queue: aio.Queue[DeliveredMessage] = aio.Queue(loop=self._loop)
  File "/usr/local/lib/python3.10/asyncio/queues.py", line 34, in __init__
    super().__init__(loop=loop)
  File "/usr/local/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from Queue() since it is no longer necessary

from ble2mqtt.

devbis avatar devbis commented on August 19, 2024

It is fixed in version 0.1.1.
I had to fork that library and now it should work fine.
Commit: ec55984

from ble2mqtt.

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.