bachya / ecowitt2mqtt

Send data from Fine Offset weather stations (Ecowitt, Ambient Weather, Froggit, etc.) to MQTT!
MIT License
219 stars 46 forks source link

Exception caused a shutdown: 'Client' object has no attribute 'message_retry_set' #1065

Closed platise closed 2 months ago

platise commented 2 months ago

Using pip install eco....

I receive: Exception caused a shutdown: 'Client' object has no attribute 'message_retry_set'

2024-08-07 22:49:59,604 | INFO | Starting ecowitt2mqtt (version 2022.10.1)
2024-08-07 22:49:59,605 | DEBUG | Starting runtime
2024-08-07 22:50:03,256 | DEBUG | Received data from an Ecowitt device: {'PASSKEY': '9B284CC8EBAABE6A1D032B9F0DD55730', 'stationtype': 'EasyWeatherPro_V5.1.3', 'runtime': '17553', 'dateutc': '2024-08-07 21:50:02', 'tempinf': '78.8', 'humidityin': '65', 'baromrelin': '29.453', 'baromabsin': '29.453', 'tempf': '71.1', 'humidity': '79', 'winddir': '35', 'windspeedmph': '1.79', 'windgustmph': '2.24', 'maxdailygust': '3.13', 'solarradiation': '0.00', 'uv': '0', 'rrain_piezo': '0.000', 'erain_piezo': '0.000', 'hrain_piezo': '0.000', 'drain_piezo': '0.000', 'wrain_piezo': '0.000', 'mrain_piezo': '0.000', 'yrain_piezo': '0.000', 'ws90cap_volt': '0.9', 'ws90_ver': '143', 'gain10_piezo': '1.00', 'gain20_piezo': '1.00', 'gain30_piezo': '1.00', 'gain40_piezo': '1.00', 'gain50_piezo': '1.00', 'wh90batt': '2.52', 'freq': '868M', 'model': 'HP2564AE_Pro_V1.9.3', 'interval': '10'}
2024-08-07 22:50:03,257 | DEBUG | Creating MQTT loop: jetson@localhost:1883
INFO:     192.168.1.104:52495 - "POST /data/report/ HTTP/1.1" 204 No Content
2024-08-07 22:50:03,260 | ERROR | Exception caused a shutdown: 'Client' object has no attribute 'message_retry_set'
Traceback (most recent call last):
  File "/home/uros/.local/lib/python3.8/site-packages/ecowitt2mqtt/runtime.py", line 102, in create_loop
    async with Client(
  File "/home/uros/.local/lib/python3.8/site-packages/asyncio_mqtt/client.py", line 349, in __init__
    self._client.message_retry_set(message_retry_set)
AttributeError: 'Client' object has no attribute 'message_retry_set'
2024-08-07 22:50:03,262 | DEBUG |   File "/home/uros/.local/lib/python3.8/site-packages/ecowitt2mqtt/runtime.py", line 102, in create_loop
    async with Client(
  File "/home/uros/.local/lib/python3.8/site-packages/asyncio_mqtt/client.py", line 349, in __init__
    self._client.message_retry_set(message_retry_set)

2024-08-07 22:50:03,263 | DEBUG | Stopping runtime
2024-08-07 22:50:03,264 | DEBUG | Runtime shutdown complete
bachya commented 2 months ago

I can't speak to the cause of this particular error, but I notice that you're using Python 3.8. This library requires a minimum of Python 3.10 (see the docs); I recommend you update and see if the error persists.

platise commented 2 months ago

Installed python 3.12 and now it works, tnx for quick response (maybe to add check about min versions).