allow 2.0.0-dev-nightly #74

Open
opened 2024-08-21 09:31:01 +02:00 by mabed-fr · 0 comments
mabed-fr commented 2024-08-21 09:31:01 +02:00 (Migrated from github.com)

Hello,

can bypass version check ?

>>> api.add_monitor(
...     type=MonitorType.HTTP,
...     name="Google",
...     url="https://google.com"
... )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 1468, in add_monitor
    data = self._build_monitor_data(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 813, in _build_monitor_data
    if parse_version(self.version) >= parse_version("1.22"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/packaging/version.py", line 56, in parse
    return Version(version)
           ^^^^^^^^^^^^^^^^
  File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/packaging/version.py", line 202, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '2.0.0-dev-nightly-20240624080807'
Hello, can bypass version check ? ``` >>> api.add_monitor( ... type=MonitorType.HTTP, ... name="Google", ... url="https://google.com" ... ) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 1468, in add_monitor data = self._build_monitor_data(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 813, in _build_monitor_data if parse_version(self.version) >= parse_version("1.22"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/packaging/version.py", line 56, in parse return Version(version) ^^^^^^^^^^^^^^^^ File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/packaging/version.py", line 202, in __init__ raise InvalidVersion(f"Invalid version: '{version}'") packaging.version.InvalidVersion: Invalid version: '2.0.0-dev-nightly-20240624080807' ```
Sign in to join this conversation.
No description provided.