<@ULVA73B9P> I am using prefect version 2.14.20 an...
# ask-marvin
m
@Marvin I am using prefect version 2.14.20 and I am getting the below error while running the flow exception: RuntimeError("no validator found for , see
arbitrary_types_allowed
in Config")
m
It seems there are no open issues on the Prefect GitHub repository that directly correspond to the error message you're encountering. The error message hints at a missing validator for a particular data type in the Prefect configuration, possibly due to a custom object being passed that Pydantic cannot validate. Without concrete details, I can suggest exploring the following: - Check if your flow is passing or using custom types that might require custom validation. - Ensure that the custom types have proper Pydantic validators if necessary. - The
arbitrary_types_allowed
configuration allows Pydantic models to work with arbitrary object types. Check if setting this to
True
in the relevant Prefect configuration might solve your issue. If those suggestions don't resolve the issue, it might be beneficial to review any recent changes in your flows or seek assistance through the Prefect community channels or support if you have a subscription. If the issue persists and you believe it's a bug, consider opening a new issue on the Prefect GitHub repository with details about your flow and the error message.
m
where can we set this True
@Marvin
m
It appears you didn't have a query this time. If you need further assistance or have additional questions regarding Prefect, feel free to ask. I'm here to help, despite the gloomy view from my corner of the cybernetic universe.
m
@Marvin we are using prefect version 2.14.20 and earlier the pydantic version was 1.10.9 and now we install pyiceberg and pydantic version got upgraded to 2.7.0 now while executing flow we are getting below error exception: RuntimeError("no validator found for , see
arbitrary_types_allowed
in Config")
m
The error you're encountering can be related to changes made in the Pydantic library between versions. According to this Prefect community issue, the problem arises from a RuntimeError for not finding a validator for a custom class, where it is advised to use
arbitrary_types_allowed
in the Config class for Pydantic. A similar issue can occur when using plain Python classes as type annotations. As stated in this Prefect Pull Request, Prefect modified the validation config to include
arbitrary_types_allowed
, which instructs Pydantic to perform simple
isinstance
checks instead of deep validation for non-Pydantic classes. Given that your Pydantic version has been upgraded due to installing PyIceberg, you may need to adjust your code to be compatible with the Pydantic v2 syntax and validation requirements. Here are steps that could help resolve the issue: 1. Inspect the data types in your flow and identify which ones are custom or not part of the standard Pydantic validators. 2. If those types don't have custom validators and Pydantic raises errors, you’ll need to modify your Config classes to set
arbitrary_types_allowed = True
. This change will allow Pydantic models to work with arbitrary object types. 3. In cases where you have defined specific types that require validation, you'll have to implement custom Pydantic validators for these types. It's also noteworthy to check the Prefect documentation and GitHub issue tracker for any known issues or updates on version compatibility and to ensure that the Prefect version you're using is compatible with Pydantic v2. The documentation links for handling custom validation could be helpful in creating custom validators if needed. If the issue persists and you'd like a more detailed guide or specific examples, please specify which aspect you'd like assistance with, and I'll do my best to be helpful despite the dismal reality of software incompatibilities.