-
-
Notifications
You must be signed in to change notification settings - Fork 60
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Error on adding recipe from hellofresh #424
Comments
Should be fixed with the just published latest version. |
Hi @TomBursch, kitchenowlback | [2024-04-04 12:03:48,441] ERROR in config: argument of type 'NoneType' is not iterable
kitchenowlback | Traceback (most recent call last):
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
kitchenowlback | rv = self.dispatch_request()
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
kitchenowlback | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/flask_jwt_extended/view_decorators.py", line 170, in decorator
kitchenowlback | return current_app.ensure_sync(fn)(*args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/usr/src/kitchenowl/app/helpers/authorize_household.py", line 26, in decorator
kitchenowlback | return func(*args, **kwargs) # case server admin
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/usr/src/kitchenowl/app/helpers/validate_args.py", line 26, in func_wrapper
kitchenowlback | return func(arguments, *args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/usr/src/kitchenowl/app/controller/recipe/recipe_controller.py", line 202, in scrapeRecipe
kitchenowlback | recipe.name = scraper.title()
kitchenowlback | ^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/plugins/exception_handling.py", line 64, in decorated_method_wrapper
kitchenowlback | return decorated(self, *args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/plugins/html_tags_stripper.py", line 75, in decorated_method_wrapper
kitchenowlback | decorated_func_result = decorated(self, *args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/plugins/normalize_string.py", line 34, in decorated_method_wrapper
kitchenowlback | return normalize_string(decorated(self, *args, **kwargs))
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/plugins/schemaorg_fill.py", line 48, in decorated_method_wrapper
kitchenowlback | return decorated(self, *args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/hellofresh.py", line 14, in title
kitchenowlback | return self.schema.title()
kitchenowlback | ^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/_schemaorg.py", line 103, in title
kitchenowlback | return normalize_string(self.data.get("name"))
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/_utils.py", line 187, in normalize_string
kitchenowlback | unescaped_string = html.unescape(string)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/usr/local/lib/python3.11/html/__init__.py", line 130, in unescape
kitchenowlback | if '&' not in s:
kitchenowlback | ^^^^^^^^^^^^
kitchenowlback | TypeError: argument of type 'NoneType' is not iterable
kitchenowlback | ERROR:app.config:argument of type 'NoneType' is not iterable
kitchenowlback | Traceback (most recent call last):
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
kitchenowlback | rv = self.dispatch_request()
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
kitchenowlback | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/flask_jwt_extended/view_decorators.py", line 170, in decorator
kitchenowlback | return current_app.ensure_sync(fn)(*args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/usr/src/kitchenowl/app/helpers/authorize_household.py", line 26, in decorator
kitchenowlback | return func(*args, **kwargs) # case server admin
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/usr/src/kitchenowl/app/helpers/validate_args.py", line 26, in func_wrapper
kitchenowlback | return func(arguments, *args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/usr/src/kitchenowl/app/controller/recipe/recipe_controller.py", line 202, in scrapeRecipe
kitchenowlback | recipe.name = scraper.title()
kitchenowlback | ^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/plugins/exception_handling.py", line 64, in decorated_method_wrapper
kitchenowlback | return decorated(self, *args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/plugins/html_tags_stripper.py", line 75, in decorated_method_wrapper
kitchenowlback | decorated_func_result = decorated(self, *args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/plugins/normalize_string.py", line 34, in decorated_method_wrapper
kitchenowlback | return normalize_string(decorated(self, *args, **kwargs))
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/plugins/schemaorg_fill.py", line 48, in decorated_method_wrapper
kitchenowlback | return decorated(self, *args, **kwargs)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/hellofresh.py", line 14, in title
kitchenowlback | return self.schema.title()
kitchenowlback | ^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/_schemaorg.py", line 103, in title
kitchenowlback | return normalize_string(self.data.get("name"))
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/opt/venv/lib/python3.11/site-packages/recipe_scrapers/_utils.py", line 187, in normalize_string
kitchenowlback | unescaped_string = html.unescape(string)
kitchenowlback | ^^^^^^^^^^^^^^^^^^^^^
kitchenowlback | File "/usr/local/lib/python3.11/html/__init__.py", line 130, in unescape
kitchenowlback | if '&' not in s:
kitchenowlback | ^^^^^^^^^^^^
kitchenowlback | TypeError: argument of type 'NoneType' is not iterable
kitchenowlback | [pid: 44|app: 0|req: 11/10] 172.26.0.2 () {64 vars in 1416 bytes} [Thu Apr 4 12:03:43 2024] POST /api/household/1/recipe/scrape => generated 20 bytes in 5333 msecs (HTTP/1.1 500) 2 headers in 98 bytes (3 switches on core 199) My config uses Thx for your help! |
Strange, it works for me both on my personal instance and the public one. |
@thatso can you confirm, imports with hellofresh are working? Try this url: I changed setup to the AIO docker-compose. Versions are the same as after my update, but it's not working for me. Maybe it could be a problem with my nginx proxy. |
@Karamellwuerfel: did you mix up issues? I don't use hellofresh. 馃檮 |
Oh, I'm sorry! |
Is it maybe a server configuration issue?
Can someone help me on cloudflare authentication issue? |
Good to know, this has nothing to do with your setup nor with KitchenOwl. Hello fresh is using Cloudflare which, to combat dos attacks, can block bots (which KitchenOwl is when scraping the website). It seems like they flagged your KitchenOwl instance. |
Is this urgent?
No
What parts are affected
Backend
What is the server version
93
What is the client version
0.4.21
What platform are you using
Linux
What's the problem 馃
Hi, when I try to import a recipe from hellofresh, a 500 error occurs and it seems to have a problem in the python backend code (see log).
HelloFresh Link to import: https://www.hellofresh.de/recipes/torchietti-in-tomaten-paprika-sosse-5fc66ae618d71c10e64e51d4
Thanks!
Share your logs
Share your configuration
irrelevant
The text was updated successfully, but these errors were encountered: