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

Can't import rescipes from rezeptsuite #2467

Closed
boospy opened this issue May 17, 2023 · 8 comments
Closed

Can't import rescipes from rezeptsuite #2467

boospy opened this issue May 17, 2023 · 8 comments
Labels
[feat] App Import application importers

Comments

@boospy
Copy link

boospy commented May 17, 2023

Tandoor Version

1.4.9

Setup

Docker / Docker-Compose

Reverse Proxy

Nginx Proxy Manager (NPM)

Other

No response

Bug description

Hello all,

i have about 600 recipes on my local software from rezeptsuite.de. For import, i exported the DB as xml like rezeptSuite-15-05-2023.cml. But if i import the file, i get success on the importpage with 0 imported recipes. So i enabled debug and get this error message below.

Can anyone help to get importer running with rezeptsuite.de?

Very thanks
Best Regards :)

Relevant logs

tandoor-rezepte-web_recipes-1    | Traceback (most recent call last):
tandoor-rezepte-web_recipes-1    |   File "/opt/recipes/cookbook/integration/integration.py", line 212, in do_import
tandoor-rezepte-web_recipes-1    |     recipe = self.get_recipe_from_file(f['file'])
tandoor-rezepte-web_recipes-1    |   File "/opt/recipes/cookbook/integration/rezeptsuitede.py", line 22, in get_recipe_from_file
tandoor-rezepte-web_recipes-1    |     name=recipe_xml.find('head').attrib['title'].strip(),
tandoor-rezepte-web_recipes-1    | AttributeError: '_io.BytesIO' object has no attribute 'find'
@vabene1111
Copy link
Collaborator

according to the docs the rezueptsuit export should be an xml file https://docs.tandoor.dev/features/import_export/#rezeptsuitede

not sure if that has changed but try if that can be exported. If not i would need a sample of the cml file so i can build another importer for rezeptsuite

@vabene1111 vabene1111 added the [feat] App Import application importers label May 17, 2023
@boospy
Copy link
Author

boospy commented May 17, 2023

Thank you for your reply. I have generated a new DB with some recipes. File attached.
rezeptSuite-17-05-2023.cml.zip

@boospy
Copy link
Author

boospy commented May 26, 2023

I've read in forum and the handbook, but i can't find something to export directly as XML.

@vabene1111
Copy link
Collaborator

interesting, i will need to investigate this, might be that something changed there

@boospy
Copy link
Author

boospy commented Jun 14, 2023

interesting, i will need to investigate this, might be that something changed there

ok, thank you

@vabene1111
Copy link
Collaborator

ok so looks like recipesuite zips there exports and renames their xml to .cml for whatever reason.

I added to the docs that you need to unzip the export and rename .cml to .xml

I also hardened the importer to better handle non available fields and got your import to work very well.

@boospy
Copy link
Author

boospy commented Jun 20, 2023

Very thanks @vabene1111 so i wait for the next relelase (i use docker), right?

@vabene1111
Copy link
Collaborator

Correct, shouldn't be too long, just waiting for some feedback on the latest beta (which you can test if you want) and will release it afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[feat] App Import application importers
Projects
None yet
Development

No branches or pull requests

2 participants