You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
got strange error while performing a search in 0.8.3:
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 122, in decorated
return f(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 57, in decorated
return f(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 359, in search
response = add_calculator_card(html_soup)
File "/home/pi/.local/lib/python3.9/site-packages/app/utils/widgets.py", line 51, in add_calculator_card
widget_file = open('app/static/widgets/calculator.html') FileNotFoundError: [Errno 2] No such file or directory: 'app/static/widgets/calculator.html'
total 20
-rw-r--r-- 1 pi pi 8519 Aug 22 07:14 calculator.html
drwxr-xr-x 2 pi pi 4096 Aug 22 07:14 .
drwxr-xr-x 10 pi pi 4096 Aug 22 07:14 ..
pi@pihole:[~/.local/lib/python3.9/site-packages/app/static/widgets]
The text was updated successfully, but these errors were encountered:
app/static/widgets/calculator.html
That's a path relative to the root of the directory so starting whoogle from somewhere else (ex. starting the application as a systemd service) will give an error.
I guess I could patch it resolving the path with Path(file) but a global BASE_DIR variable could be better.
Moist-Cat
added a commit
to Moist-Cat/whoogle-search
that referenced
this issue
Sep 10, 2023
Hi,
got strange error while performing a search in 0.8.3:
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 122, in decorated
return f(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 57, in decorated
return f(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 359, in search
response = add_calculator_card(html_soup)
File "/home/pi/.local/lib/python3.9/site-packages/app/utils/widgets.py", line 51, in add_calculator_card
widget_file = open('app/static/widgets/calculator.html')
FileNotFoundError: [Errno 2] No such file or directory: 'app/static/widgets/calculator.html'
but:
pi@pihole:[~/.local/lib/python3.9/site-packages/app/static/widgets] $ ll
total 20
-rw-r--r-- 1 pi pi 8519 Aug 22 07:14 calculator.html
drwxr-xr-x 2 pi pi 4096 Aug 22 07:14 .
drwxr-xr-x 10 pi pi 4096 Aug 22 07:14 ..
pi@pihole:[~/.local/lib/python3.9/site-packages/app/static/widgets]
The text was updated successfully, but these errors were encountered: