Skip to content

importing library fails. pydantic.errors.PydanticUserError: Field 'decimals' defined on a base class was overridden by a non-annotated attribute #57

@pedrodparkes

Description

@pedrodparkes

tested on Py 3.8, 3.9 in docker containers:
python:3.8-slim
python:3.8-bullseye
python:3.9-alpine3.17
and later py versions.

#0 1.888 Traceback (most recent call last): #0 1.888 File "/main.py", line 1, in <module> #0 1.888 from zksync_sdk import ZkSyncLibrary #0 1.888 File "/usr/local/lib/python3.8/site-packages/zksync_sdk/__init__.py", line 1, in <module> #0 1.888 from .ethereum_provider import EthereumProvider #0 1.888 File "/usr/local/lib/python3.8/site-packages/zksync_sdk/ethereum_provider.py", line 6, in <module> #0 1.888 from zksync_sdk.types import Token #0 1.888 File "/usr/local/lib/python3.8/site-packages/zksync_sdk/types/__init__.py", line 3, in <module> #0 1.888 from .responses import * #0 1.888 File "/usr/local/lib/python3.8/site-packages/zksync_sdk/types/responses.py", line 26, in <module> #0 1.888 class NFT(Token): #0 1.888 File "/usr/local/lib/python3.8/site-packages/pydantic/_internal/_model_construction.py", line 98, in __new__ #0 1.888 private_attributes = inspect_namespace( #0 1.888 File "/usr/local/lib/python3.8/site-packages/pydantic/_internal/_model_construction.py", line 337, in inspect_namespace #0 1.888 raise PydanticUserError( #0 1.888 pydantic.errors.PydanticUserError: Field 'decimals' defined on a base class was overridden by a non-annotated attribute. All field definitions, including overrides, require a type annotation. #0 1.888 #0 1.888 For further information visit https://errors.pydantic.dev/2.1.1/u/model-field-overridden

docker-compose build fails with other error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions