lucasheld / uptime-kuma-api

A Python wrapper for the Uptime Kuma Socket.IO API
https://uptime-kuma-api.readthedocs.io
MIT License
269 stars 20 forks source link

New type 'group' is not a valid MonitorType #40

Closed MrTomek closed 1 year ago

MrTomek commented 1 year ago
➜  python3 uptimekuma.30s.py
<class 'ValueError'>
("'group' is not a valid MonitorType",)
'group' is not a valid MonitorType
📛
---
No monitor! | color='red'
Click here to configure | href='file:///Users/lucek/Downloads/uptimekuma.30s.py'
MrTomek commented 1 year ago

Traceback

Traceback (most recent call last):
  File "/Users/lucek/Downloads/uptimekuma.30s.py", line 31, in <module>
    monitor_list = api.get_monitors()
                   ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 1023, in get_monitors
    parse_monitor_type(r)
  File "/opt/homebrew/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 72, in parse_monitor_type
    parse_value(data, "type", MonitorType)
  File "/opt/homebrew/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 57, in parse_value
    parse_value(d, key, type_, default)
  File "/opt/homebrew/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 61, in parse_value
    data[key] = type_(data[key])
                ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4/Frameworks/Python.framework/Versions/3.11/lib/python3.11/enum.py", line 711, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4/Frameworks/Python.framework/Versions/3.11/lib/python3.11/enum.py", line 1128, in __new__
    raise ve_exc
ValueError: 'group' is not a valid MonitorType
lucasheld commented 1 year ago

Thanks. As described in the README, the latest supported Uptime Kuma version is 1.21.3. When I have time, I'll implement the upstream changes to support Uptime Kuma 1.22.

lucasheld commented 1 year ago

Uptime kuma 1.22.1 is supported in version 1.1.0.