Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation error for recipes #32

Closed
lionelasshauer opened this issue Jan 13, 2024 · 3 comments
Closed

Validation error for recipes #32

lionelasshauer opened this issue Jan 13, 2024 · 3 comments
Assignees

Comments

@lionelasshauer
Copy link

Hi everyone,

after installing version 0.0.17 (according to pipx), I am able to get the required token and could also pull my favorites.
But it will instantly throw the following error for one recipe. I tried to pick specific recipes via oid, but they all return the same thing. The download into the json file did work regardless of the error.

ValidationError: 1 validation error for Recipe
steps.1.image
Field required [type=missing, input_value={'title': {'en': 'Quarter...ari',
'pt': 'melão'}}]}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.5/v/missing

Whenever I try to list the local recipes or run the Paprika export I get the same error.
Is there any way to fix this?

Python 3.10.13 macOS

@ephes
Copy link
Owner

ephes commented Mar 13, 2024

Thanks for your report.

Is this maybe fixed with 0.0.18 or 0.0.19?

@lionelasshauer
Copy link
Author

Unfortunately the error still seems to persist. I upgraded to 0.0.19 and cleared out the local repository and resynced my recipes (500+).

But I just tried a random recipe and only imported one (after clearing out my local repo again) and was actually able to import it. So it seems like one or more recipes deliver the data in the wrong format.

@ephes ephes self-assigned this Sep 13, 2024
ephes added a commit that referenced this issue Sep 13, 2024
…om recipe_as_json and make sure the recipe is parsable by json.loads()
ephes added a commit that referenced this issue Sep 13, 2024
@ephes
Copy link
Owner

ephes commented Sep 13, 2024

Yep, just stumbled over the same recipe, I think 😆. The reason was an unescaped newline in the title of the steps which are joined into the description for Paprika. Version 0.0.20 should fix this.

@ephes ephes closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants