peterhinch / micropython-mqtt

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

TypeError: object of type 'int' has no len() #112

Closed zcattacz closed 1 year ago

zcattacz commented 1 year ago

On connection recovery, I got the following error if last_will is not specified in config. This does not affect initial connect().

Connecting to broker.
Task exception wasn't retrieved
future: <Task> coro= <generator object '_keep_connected' at 3ffea7e0>
Traceback (most recent call last):
  File "uasyncio/core.py", line 1, in run_until_complete
  File "mqtt_as.py", line 747, in _keep_connected
  File "mqtt_as.py", line 637, in connect
  File "mqtt_as.py", line 284, in _connect
TypeError: object of type 'int' has no len()
peterhinch commented 1 year ago

Please could you try the demo clean.py. This does not set the last will and has been extensively tested.

zcattacz commented 1 year ago

Can't replicate this right now :-(. whether clean.py or my script. Close for now.