peterhinch / micropython-mqtt

A 'resilient' asynchronous MQTT driver. Recovers from WiFi and broker outages.
MIT License
549 stars 116 forks source link

Issue with the memoryview #135

Open Valadimirovich opened 3 months ago

Valadimirovich commented 3 months ago

I am not sure if it's related to the use of 1.23 firmware, but it happens during the initial connection after the reset

Traceback (most recent call last): File "asyncio/core.py", line 1, in run_until_complete File "", line 448, in outgoing File "mqtt_as.py", line 797, in publish File "mqtt_as.py", line 409, in publish File "mqtt_as.py", line 444, in _publish File "mqtt_as.py", line 235, in _as_write TypeError: object with buffer protocol required

peterhinch commented 3 months ago

Please can you give me some more detail.

  1. What hardware are you using?
  2. Does the error occur if you run the range.py demo?
Valadimirovich commented 3 months ago

Thank you for your prompt response

  1. ESP32-S3 with SPIRAM, n8r2
  2. Nope, range.py runs fine
peterhinch commented 3 months ago

If range.py runs, publications are occurring successfully, which suggests that the firmware is OK.

The topic and msg args should be bytes or bytearray instances: the traceback suggests that something else is being passed.