You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed the package with python 3.8 and I got the error message below.
| python
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from platechain.constants import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ws/git/platechain/src/platechain/__init__.py", line 1, in <module>
from platechain.chain import chain, parse_plates
File "/home/ws/git/platechain/src/platechain/chain.py", line 38, in <module>
class ParsePlateRequest(BaseModel):
File "/home/ws/.cache/pypoetry/virtualenvs/platechain-H7xkWrxE-py3.8/lib/python3.8/site-packages/pydantic/_internal/_model_construction.py", line 183, in __new__
set_model_fields(cls, bases, config_wrapper, types_namespace)
File "/home/ws/.cache/pypoetry/virtualenvs/platechain-H7xkWrxE-py3.8/lib/python3.8/site-packages/pydantic/_internal/_model_construction.py", line 418, in set_model_fields
fields, class_vars = collect_model_fields(cls, bases, config_wrapper, types_namespace, typevars_map=typevars_map)
File "/home/ws/.cache/pypoetry/virtualenvs/platechain-H7xkWrxE-py3.8/lib/python3.8/site-packages/pydantic/_internal/_fields.py", line 99, in collect_model_fields
type_hints = get_cls_type_hints_lenient(cls, types_namespace)
File "/home/ws/.cache/pypoetry/virtualenvs/platechain-H7xkWrxE-py3.8/lib/python3.8/site-packages/pydantic/_internal/_typing_extra.py", line 212, in get_cls_type_hints_lenient
hints[name] = eval_type_lenient(value, globalns, localns)
File "/home/ws/.cache/pypoetry/virtualenvs/platechain-H7xkWrxE-py3.8/lib/python3.8/site-packages/pydantic/_internal/_typing_extra.py", line 224, in eval_type_lenient
return typing._eval_type(value, globalns, localns) # type: ignore
File "/usr/lib/python3.8/typing.py", line 270, in _eval_type
return t._evaluate(globalns, localns)
File "/usr/lib/python3.8/typing.py", line 518, in _evaluate
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Apparently support for expressing unions of types using the pipe operater was only introduced in python 3.10. So I think this needs to be reflected in the requirements file (At the moment it is set to ^3.8)
The text was updated successfully, but these errors were encountered:
wjs20
added a commit
to wjs20/platechain
that referenced
this issue
Feb 8, 2024
I installed the package with python 3.8 and I got the error message below.
Apparently support for expressing unions of types using the pipe operater was only introduced in python 3.10. So I think this needs to be reflected in the requirements file (At the moment it is set to ^3.8)
The text was updated successfully, but these errors were encountered: