Open Karamellwuerfel opened 6 months ago
Should be fixed with the just published latest version.
Hi @TomBursch, I updated to the last two versions of your images and still get the following error in backend:
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 image: tombursch/kitchenowl-web:latest
and image: tombursch/kitchenowl:latest
.
In the web-frontend I got the versions
Thx for your help!
Strange, it works for me both on my personal instance and the public one.
My steps to update were
docker-compose pull
docker-compose up --force-recreate --build -d
docker image prune -f
On web-frontend the error looks like this:
Browser network:
@thatso can you confirm, imports with hellofresh are working? Try this url: https://www.hellofresh.de/recipes/torchietti-in-tomaten-paprika-sosse-5fc66ae618d71c10e64e51d4
Thanks!
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. :roll_eyes:
@Karamellwuerfel: did you mix up issues? I don't use hellofresh. 🙄
Oh, I'm sorry!
Is it maybe a server configuration issue?
02:~$ ping hellofresh.de
PING hellofresh.de (54.72.116.110) 56(84) bytes of data.
--- hellofresh.de ping statistics ---
56 packets transmitted, 0 received, 100% packet loss, time 56297ms
02:~$ curl hellofresh.de
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
</body>
</html>
02:~$ curl www.hellofresh.de
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | Cloudflare</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->
<style>body{margin:0;padding:0}</style>
<!--[if gte IE 10]><!-->
<script>
if (!navigator.cookieEnabled) {
window.addEventListener('DOMContentLoaded', function () {
var cookieEl = document.getElementById('cookie-alert');
cookieEl.style.display = 'block';
})
}
</script>
<!--<![endif]-->
</head>
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