uhd-urz / elAPI

An extensible API client for eLabFTW
GNU Affero General Public License v3.0
5 stars 0 forks source link

elapi throws TypeError on Python 3.9 #3

Closed alexander-haller closed 4 months ago

alexander-haller commented 1 year ago

In GitLab by @mhxion on Nov 16, 2023, 01:26

Upon installing elapi on Python 3.9 elapi gives the following error:

Traceback (most recent call last):
  File "/home/debian/.local/bin/elapi", line 5, in <module>
    from elapi.cli.elapi import app
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/cli/elapi.py", line 24, in <module>
    from ._doc import __PARAMETERS__doc__ as docs
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/cli/_doc.py", line 4, in <module>
    from ..configuration import APP_NAME
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/configuration/__init__.py", line 3, in <module>
    from .config import (
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/configuration/config.py", line 22, in <module>
    from ._config_history import ConfigHistory, InspectConfigHistory
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/configuration/_config_history.py", line 14, in <module>
    logger = Logger()
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/loggers/__init__.py", line 13, in __new__
    return MainLogger()
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/loggers/base.py", line 14, in __new__
    from ..configuration.log_file import LOG_FILE_PATH
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/configuration/log_file.py", line 13, in <module>
    from ..validators import (
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/validators/__init__.py", line 10, in <module>
    from .path import PathValidator
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/validators/path.py", line 19, in <module>
    class PathValidator(Validator):
  File "/home/debian/.local/lib/python3.9/site-packages/elapi/validators/path.py", line 22, in PathValidator
    path: Union[Iterable[...], Union[None, str, ProperPath, Path]],
  File "/usr/lib/python3.9/typing.py", line 268, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3.9/typing.py", line 820, in __getitem__
    params = tuple(_type_check(p, msg) for p in params)
  File "/usr/lib/python3.9/typing.py", line 820, in <genexpr>
    params = tuple(_type_check(p, msg) for p in params)
  File "/usr/lib/python3.9/typing.py", line 157, in _type_check
    raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: Parameters to generic types must be types. Got Ellipsis.