Git Product home page Git Product logo

Comments (8)

ephes avatar ephes commented on June 12, 2024 2

Thanks for your report!

I have a little bit trouble to reproduce it, since I am not able to run mealie at the moment :). But it should be possible to only compare against the list of recipes from kptncook. I think we add a kptncook tag for each recipe added by kptncook sync.

I'll look into this on the weekend, probably.

from kptncook.

m4um4u1 avatar m4um4u1 commented on June 12, 2024 1

Sounds good, if you need help in any way, just let me know :)

from kptncook.

ephes avatar ephes commented on June 12, 2024 1

Your issue seems to be caused by the pydantic2 upgrade from last month. In pydantic 1 foo: str | None ment that the foo attribute is optional. In pydantic 2 it now means that it could be None, but is not optional. So I had replace those lines with foo: str | None = None which means foo is optional in pydantic 2, too.

I also now skip recipes failing validation. I'm not really sure whether this is the right approach because now kptncook recipes might become re-added when they cannot be validated as mealie recipes. But just crashing is maybe also not the best approach.

Anyway - the issue from above should be fixed in 0.0.13

from kptncook.

m4um4u1 avatar m4um4u1 commented on June 12, 2024 1

Thanks a lot for your hard work 😊

from kptncook.

ca-dmin avatar ca-dmin commented on June 12, 2024 1

@ephes

Thanks for your tool 👍

In order for me to sync to Mealie today, I still need to put in a fix:

diff mealie.py.0.0.13 mealie.py
134c134
<     file_name: str | None
---
>     file_name: str | None = None

class RecipeAsset(BaseModel):
name: str
icon: str
file_name: str | None = None

from kptncook.

m4um4u1 avatar m4um4u1 commented on June 12, 2024

I forgot to add the error:

ValidationError: 2 validation errors for Recipe
recipe_yield
Field required [type=missing, input_value={'id': 'f1219ce4-7521-443...4326', 'lastMade': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.4/v/missing
nutrition
Field required [type=missing, input_value={'id': 'f1219ce4-7521-443...4326', 'lastMade': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.4/v/missing

from kptncook.

ephes avatar ephes commented on June 12, 2024

The problem with my broken mealie instance is that the nuxt server process does not seem to forward requests to the fastapi python process. A request to my mealie instances api docs returns a 404 for example and I don't know why. Maybe some issue with the nuxt config, dunno.

Managed to work around this issue by forwarding the fastapi port to my local machine using ssh so I was still able to run kptncook sync against it and immediately could reproduce your issue 😅.

from kptncook.

ephes avatar ephes commented on June 12, 2024

Seems I forgot some lines 😅. Should be fixed in 0.0.14

from kptncook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.