mirumee / saleor-app-framework-python

Python Saleor App/Extension boilerplate. Batteries included.
https://mirumee.github.io/saleor-app-framework-python/
BSD 3-Clause "New" or "Revised" License
50 stars 23 forks source link

Error while starting the app #51

Closed amoukhtari closed 9 months ago

amoukhtari commented 1 year ago

Hello, I'm trying out the saleor app framework with fastAPI and I can't get it to work. I followed the steps to run it, but I get this error:

pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'saleor_app.schemas.utils.LazyUrl'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.

I installed the app framework using pip and I'm using pydantic==2.0.3 I wonder if that has anything to do with the error

pkucmus commented 9 months ago

Sorry, I missed this. The work for the "app framework" to support Pydantic 2 was never done and never will be as it is now replaced by https://github.com/mirumee/saleor-sdk-python.