SAIC-iSmart-API / saic-python-mqtt-gateway

A service that queries the data from an MG iSMART account and publishes the data over MQTT and to other sources
MIT License
71 stars 21 forks source link

Typo in mqtt_gateway.py #136

Closed sfudeus closed 8 months ago

sfudeus commented 8 months ago

New release 0.5.0 logs the following error:

│ 2024-01-28 15:11:25,686 [  INFO  ] Running job "Check for new messages (trigger: interval[0:01:00], next run at: 2024-01-28 15:12:25 UTC)" (scheduled at 2024-01-28 15:11:25.680757+00:00) - apscheduler.executors.default                             │
│ 2024-01-28 15:11:25,690 [ ERROR  ] Job "Check for new messages (trigger: interval[0:01:00], next run at: 2024-01-28 15:12:25 UTC)" raised an exception - apscheduler.executors.default                                                                 │
│ Traceback (most recent call last):                                                                                                                                                                                                                     │
│   File "/usr/local/lib/python3.12/site-packages/apscheduler/executors/base_py3.py", line 30, in run_coroutine_job                                                                                                                                      │
│     retval = await job.func(*job.args, **job.kwargs)                                                                                                                                                                                                   │
│              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   │
│   File "/usr/src/app/./mqtt_gateway.py", line 438, in check_for_new_messages                                                                                                                                                                           │
│     if self.__shoulCd_poll():                                                                                                                                                                                                                          │
│        ^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                             │
│ AttributeError: 'MessageHandler' object has no attribute '_MessageHandler__shoulCd_poll'. Did you mean: '_MessageHandler__should_poll'?

Caused by a typo here:

https://github.com/SAIC-iSmart-API/saic-python-mqtt-gateway/blob/d405de60685fb5d92e6a775e7b6d263bbc98c397/mqtt_gateway.py#L438C17-L438C31