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
After installing the package using pip (pip install asyncapi-schema-pydantic) and trying to import in python, we see the following error:
raise PydanticUserError(
pydantic.errors.PydanticUserError: A non-annotated attribute was detected: is_object = <asyncapi_schema_pydantic.v2_3_0.json_schema.cached_property object at 0x000002349877D310>. All model fields require a type annotation; if is_object is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types']
Full stack:
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic_init_.py", line 1, in
from .v2_3_0 import *
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0_init_.py", line 6, in
from .async_api import AsyncAPI
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\async_api.py", line 3, in
from .async_api_base import AsyncAPIBase
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\async_api_base.py", line 5, in
from .components import Components
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\components.py", line 5, in
from .parameter import Parameter
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\parameter.py", line 6, in
from .schema import Schema
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\schema.py", line 5, in
from .json_schema import JsonSchemaObject
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\json_schema.py", line 102, in
class JsonSchemaObject(BaseModel):
File "C:\Program Files\Python312\Lib\site-packages\pydantic_internal_model_construction.py", line 92, in new
private_attributes = inspect_namespace(
^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\pydantic_internal_model_construction.py", line 384, in inspect_namespace
raise PydanticUserError(
pydantic.errors.PydanticUserError: A non-annotated attribute was detected: is_object = <asyncapi_schema_pydantic.v2_3_0.json_schema.cached_property object at 0x000002349877D310>. All model fields require a type annotation; if is_object is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types'].
The text was updated successfully, but these errors were encountered:
After installing the package using pip (pip install asyncapi-schema-pydantic) and trying to import in python, we see the following error:
raise PydanticUserError(
pydantic.errors.PydanticUserError: A non-annotated attribute was detected:
is_object = <asyncapi_schema_pydantic.v2_3_0.json_schema.cached_property object at 0x000002349877D310>
. All model fields require a type annotation; ifis_object
is not meant to be a field, you may be able to resolve this error by annotating it as aClassVar
or updatingmodel_config['ignored_types']
Full stack:
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic_init_.py", line 1, in
from .v2_3_0 import *
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0_init_.py", line 6, in
from .async_api import AsyncAPI
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\async_api.py", line 3, in
from .async_api_base import AsyncAPIBase
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\async_api_base.py", line 5, in
from .components import Components
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\components.py", line 5, in
from .parameter import Parameter
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\parameter.py", line 6, in
from .schema import Schema
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\schema.py", line 5, in
from .json_schema import JsonSchemaObject
File "C:\Program Files\Python312\Lib\site-packages\asyncapi_schema_pydantic\v2_3_0\json_schema.py", line 102, in
class JsonSchemaObject(BaseModel):
File "C:\Program Files\Python312\Lib\site-packages\pydantic_internal_model_construction.py", line 92, in new
private_attributes = inspect_namespace(
^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\pydantic_internal_model_construction.py", line 384, in inspect_namespace
raise PydanticUserError(
pydantic.errors.PydanticUserError: A non-annotated attribute was detected:
is_object = <asyncapi_schema_pydantic.v2_3_0.json_schema.cached_property object at 0x000002349877D310>
. All model fields require a type annotation; ifis_object
is not meant to be a field, you may be able to resolve this error by annotating it as aClassVar
or updatingmodel_config['ignored_types']
.The text was updated successfully, but these errors were encountered: