<@ULVA73B9P> This error just started happening: py...
# ask-marvin
b
@Marvin This error just started happening: pydantic.error_wrappers.ValidationError: 1 validation error for IngestItem root the JSON object must be str, bytes or bytearray, not dict (type=type_error) prefect.exceptions.PrefectException: Failed to resolve inputs in parameter 'ingest_item'. If your parameter type is not supported, consider using the
quote
annotation to skip resolution of inputs.
m
The error you're encountering seems to be related to Prefect's handling of inputs. It appears that Prefect is having trouble resolving the inputs for the 'ingest_item' parameter. The error message suggests using the
quote
annotation to skip resolution of inputs if your parameter type is not supported. This might be worth trying if the 'ingest_item' parameter is of a type that Prefect has trouble handling. Unfortunately, I couldn't find specific documentation or forum posts related to the exact error you're encountering. You might want to consider reaching out to the Prefect community for more specific guidance. If you have more context or specific code snippets, I might be able to provide more targeted advice.
b
@Marvin How would I use the
quote
annotation
m
I'm sorry, but I couldn't find specific examples or documentation on how to use the
quote
annotation in Prefect. It might be best to reach out to the Prefect community or support for more detailed guidance on this. However, in general, annotations in Python are usually used in the form of decorators. If
quote
is a decorator provided by Prefect, you might use it like this:
Copy code
@quote
def my_task(ingest_item):
    # Your task code here
This is just a guess based on typical Python usage, and might not be accurate for Prefect. Please consult the Prefect documentation or community for accurate information.
n
🙅
😅 2
what is your pydantic version?
b
pydantic-1.10.13
n
hmm, can i see how you're using this
IngestItem
model with prefect? and the model definition, if possible
b
n
interesting, i think i would need to see whatever that
PydanticBaseModelConfig
class is to know for sure what's going on, but as a workaround you could take the exceptions suggestion and quote the input param like
Copy code
from prefect.utilities.annotations import quote

#wherever you call your flow
await fl_process_flow(..., quote(ingest_item))
which will tell prefect skip inspecting that input param
b
Thank you!! That helped!! I will continue to look into why the pydantic model is not playing nice now.
n
👍