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

Unable to import a recipe #147

Open
marillat opened this issue Mar 10, 2023 · 0 comments
Open

Unable to import a recipe #147

marillat opened this issue Mar 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@marillat
Copy link
Contributor

I'm not sure if the problem come from gourmand or recipe-scrapers

Gourmand 1.1.0 RC3 Debian amd64

Tested with this page in Spanish, English and French. Gourmand return always the same error.
https://www.webtenerifefr.com/propos-tenerife/gastronomie/produits/recettes/garbanzas-compuestas/

(gourmand:230559): Gtk-WARNING **: 12:05:48.032: ../../../gtk/gtkwidget.c:8652: widget not within a GtkWindow
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gourmand/main.py", line 657, in do_import
    self.importManager.offer_import(parent=self.app.get_toplevel())
  File "/usr/lib/python3/dist-packages/gourmand/importers/importManager.py", line 80, in offer_import
    import_interactivally(unsupported)
  File "/usr/lib/python3/dist-packages/gourmand/importers/interactive_importer.py", line 521, in import_interactivally
    importer.images = [img['src'] for img in soup.find_all('img')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gourmand/importers/interactive_importer.py", line 522, in <listcomp>
    if img['src'].startswith('http')]
       ~~~^^^^^^^
  File "/usr/lib/python3/dist-packages/bs4/element.py", line 1535, in __getitem__
    return self.attrs[key]
           ~~~~~~~~~~^^^^^
KeyError: 'src'
@FriedrichFroebel FriedrichFroebel added the bug Something isn't working label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants