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

[BUG] KeyError: 'Dark-theme.css' #1142

Open
2 of 8 tasks
Mnikley opened this issue Apr 24, 2024 · 0 comments
Open
2 of 8 tasks

[BUG] KeyError: 'Dark-theme.css' #1142

Mnikley opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Mnikley
Copy link

Mnikley commented Apr 24, 2024

Describe the bug
Unable to launch a whoogle container

To Reproduce
Steps to reproduce the behavior:

  1. Define service in docker-compose.yml:
services:
  whoogle:
    image: benbusby/whoogle-search
    container_name: whoogle
    ports:
      - "1120:1120"
    environment:
      - EXPOSE_PORT=1120
      - WHOOGLE_CONFIG_COUNTRY=Austria
      - WHOOGLE_CONFIG_LANGUAGE=English
      - WHOOGLE_CONFIG_THEME=Dark
      - PGID=1000
      - PUID=1000
      - TZ=Europe/Vienna
  1. Launch stack
docker compose up -d
  1. Navigate to front-end on localip:1120
Internal Server Error

The server encountered an unexpected internal server error

(generated by waitress)
  1. Check docker log
❯ docker compose logs -f whoogle
whoogle  | Running on http://0.0.0.0:1120
whoogle  | Apr 24 18:09:29.157 [notice] Tor 0.4.6.9 running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1w, Zlib 1.2.12, Liblzma 5.2.5, Libzstd 1.5.0 and Unknown N/A as libc.
whoogle  | Apr 24 18:09:29.157 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
whoogle  | Apr 24 18:09:29.158 [notice] Read configuration file "/etc/tor/torrc".
whoogle  | Apr 24 18:09:29.176 [notice] Opening Socks listener on 127.0.0.1:9050
whoogle  | Apr 24 18:09:29.176 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9050
whoogle  | Apr 24 18:09:29.176 [notice] Opening Control listener on 127.0.0.1:9051
whoogle  | Apr 24 18:09:29.176 [notice] Opened Control listener connection (ready) on 127.0.0.1:9051
whoogle  | Apr 24 18:09:29.176 [warn] Fixing permissions on directory /var/lib/tor
whoogle  | * Finished creating ddg bangs json
whoogle  | Traceback (most recent call last):
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
whoogle  |     rv = self.dispatch_request()
whoogle  |          ^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
whoogle  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/routes.py", line 72, in decorated
whoogle  |     return f(*args, **kwargs)
whoogle  |            ^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/routes.py", line 210, in index
whoogle  |     return render_template('index.html',
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/templating.py", line 151, in render_template
whoogle  |     return _render(app, template, context)
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/templating.py", line 132, in _render
whoogle  |     rv = template.render(context)
whoogle  |          ^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
whoogle  |     self.environment.handle_exception()
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
whoogle  |     raise rewrite_traceback_stack(source=source)
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/templates/index.html", line 34, in top-level template code
whoogle  |     <link rel="stylesheet" href="{{ cb_url(config.theme + '-theme.css') }}"/>
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/__init__.py", line 179, in <lambda>
whoogle  |     cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f])
whoogle  |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
whoogle  | KeyError: 'Dark-theme.css'
whoogle  | 
whoogle  | ERROR:app:Exception on / [GET]
whoogle  | Traceback (most recent call last):
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
whoogle  |     rv = self.dispatch_request()
whoogle  |          ^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
whoogle  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/routes.py", line 72, in decorated
whoogle  |     return f(*args, **kwargs)
whoogle  |            ^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/routes.py", line 210, in index
whoogle  |     return render_template('index.html',
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/templating.py", line 151, in render_template
whoogle  |     return _render(app, template, context)
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/templating.py", line 132, in _render
whoogle  |     rv = template.render(context)
whoogle  |          ^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
whoogle  |     self.environment.handle_exception()
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
whoogle  |     raise rewrite_traceback_stack(source=source)
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/templates/index.html", line 34, in top-level template code
whoogle  |     <link rel="stylesheet" href="{{ cb_url(config.theme + '-theme.css') }}"/>
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/__init__.py", line 179, in <lambda>
whoogle  |     cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f])
whoogle  |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
whoogle  | KeyError: 'Dark-theme.css'
whoogle  | 
whoogle  | During handling of the above exception, another exception occurred:
whoogle  | 
whoogle  | Traceback (most recent call last):
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
whoogle  |     response = self.full_dispatch_request()
whoogle  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
whoogle  |     rv = self.handle_user_exception(e)
whoogle  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1348, in handle_user_exception
whoogle  |     return self.ensure_sync(handler)(e)
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/routes.py", line 630, in internal_error
whoogle  |     query=urlparse.unquote(query),
whoogle  |           ^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/urllib/parse.py", line 646, in unquote
whoogle  |     if '%' not in string:
whoogle  |        ^^^^^^^^^^^^^^^^^
whoogle  | TypeError: argument of type 'NoneType' is not iterable
whoogle  | Traceback (most recent call last):
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
whoogle  |     rv = self.dispatch_request()
whoogle  |          ^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
whoogle  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/routes.py", line 72, in decorated
whoogle  |     return f(*args, **kwargs)
whoogle  |            ^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/routes.py", line 210, in index
whoogle  |     return render_template('index.html',
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/templating.py", line 151, in render_template
whoogle  |     return _render(app, template, context)
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/templating.py", line 132, in _render
whoogle  |     rv = template.render(context)
whoogle  |          ^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
whoogle  |     self.environment.handle_exception()
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
whoogle  |     raise rewrite_traceback_stack(source=source)
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/templates/index.html", line 34, in top-level template code
whoogle  |     <link rel="stylesheet" href="{{ cb_url(config.theme + '-theme.css') }}"/>
whoogle  |     ^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/__init__.py", line 179, in <lambda>
whoogle  |     cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f])
whoogle  |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
whoogle  | KeyError: 'Dark-theme.css'
whoogle  | 
whoogle  | During handling of the above exception, another exception occurred:
whoogle  | 
whoogle  | Traceback (most recent call last):
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
whoogle  |     response = self.full_dispatch_request()
whoogle  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
whoogle  |     rv = self.handle_user_exception(e)
whoogle  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1348, in handle_user_exception
whoogle  |     return self.ensure_sync(handler)(e)
whoogle  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/whoogle/app/routes.py", line 630, in internal_error
whoogle  |     query=urlparse.unquote(query),
whoogle  |           ^^^^^^^^^^^^^^^^^^^^^^^
whoogle  |   File "/usr/local/lib/python3.11/urllib/parse.py", line 646, in unquote
whoogle  |     if '%' not in string:
whoogle  |        ^^^^^^^^^^^^^^^^^
whoogle  | TypeError: argument of type 'NoneType' is not iterable

Deployment Method

  • Heroku (one-click deploy)
  • Docker
  • run executable
  • pip/pipx
  • Other: [describe setup]

Version of Whoogle Search

  • Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc)
  • Version [version number]
  • Not sure

Server:

Client:

  • Device: PC
  • OS: Latest Debian
  • Browser: Firefox
  • Version: 125.0.1
@Mnikley Mnikley added the bug Something isn't working label Apr 24, 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

1 participant