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 recently updated my machine to Python 3.9.9 resulting in this obscure error when importing gt4py:
Python 3.9.9 (main, Nov 20 2021, 21:30:06)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gt4py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/gt4py/__init__.py", line 45, in <module>
from . import gtscript
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/gt4py/gtscript.py", line 33, in <module>
from gt4py.stencil_builder import StencilBuilder
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/gt4py/stencil_builder.py", line 21, in <module>
from gt4py.backend.gtc_backend.defir_to_gtir import DefIRToGTIR
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/gt4py/backend/__init__.py", line 19, in <module>
from .base import *
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/gt4py/backend/base.py", line 29, in <module>
from .module_generator import (
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/gt4py/backend/module_generator.py", line 31, in <module>
from gtc import gtir
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/gtc/gtir.py", line 35, in <module>
from eve import Node, Str, SymbolName, SymbolTableTrait, field, utils
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/eve/__init__.py", line 35, in <module>
from .concepts import (
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/eve/concepts.py", line 158, in <module>
class BaseNode(pydantic.BaseModel, metaclass=NodeMetaclass):
File "/home/tille/Development/FVM_GT4Py_storage/venv/lib/python3.9/site-packages/eve/concepts.py", line 136, in __new__
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
File "pydantic/main.py", line 282, in pydantic.main.ModelMetaclass.__new__
File "pydantic/typing.py", line 287, in pydantic.typing.resolve_annotations
For use of globalns and localns see the docstring for get_type_hints().
File "/usr/lib/python3.9/typing.py", line 292, in _eval_type
return t._evaluate(globalns, localns, recursive_guard)
File "/usr/lib/python3.9/typing.py", line 553, in _evaluate
type_ = _type_check(
File "/usr/lib/python3.9/typing.py", line 158, in _type_check
raise TypeError(f"{arg} is not valid as type argument")
TypeError: typing.ClassVar[typing.Dict[str, eve.concepts.ImplFieldMetadataDict]] is not valid as type argument
Python 3.8 works fine on the same machine.
The text was updated successfully, but these errors were encountered:
Indeed. This is a frustrating issue related to pydantic using internals of Python that changed in the latest versions. Duplicate of #551. A new version that fixes that is being prepared, see pydantic/pydantic#3436.
I recently updated my machine to Python 3.9.9 resulting in this obscure error when importing gt4py:
Python 3.8 works fine on the same machine.
The text was updated successfully, but these errors were encountered: