[GH-ISSUE #765] [BUG] "_pickle.UnpicklingError: invalid load key" for pip installation #484

Closed
opened 2026-02-25 20:35:52 +03:00 by kerem · 4 comments
Owner

Originally created by @PrivacyDevel on GitHub (May 22, 2022).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/765

Describe the bug
Whoogle Search displays "Internal Server Error" in the browser whenever I use it to make any search.
The home page gets displayed correctly and the problem seems to be specific to installations using pip.

The manual installation using git and venv is working however.

Server OS
Debian 11.3

To Reproduce

  1. Search for anything using Whoogle Search
  2. See "Internal Server Error" in client
  3. Check logs to find Tracebacks

Deployment Method

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

Version of Whoogle Search

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

Client:
The problem does not seem to be browser specific.
It happened with Firefox and curl for example.

Traceback from logs

May 21 19:55:12 debian whoogle[143677]: ERROR:app:Exception on /search [POST]
May 21 19:55:12 debian whoogle[143677]: Traceback (most recent call last):
May 21 19:55:12 debian whoogle[143677]:   File "/home/whoogle/.local/lib/python3.9/site-packages/flask/app.py", line 2077, in wsgi_app
May 21 19:55:12 debian whoogle[143677]:     response = self.full_dispatch_request()
May 21 19:55:12 debian whoogle[143677]:   File "/home/whoogle/.local/lib/python3.9/site-packages/flask/app.py", line 1525, in full_dispatch_request
May 21 19:55:12 debian whoogle[143677]:     rv = self.handle_user_exception(e)
May 21 19:55:12 debian whoogle[143677]:   File "/home/whoogle/.local/lib/python3.9/site-packages/flask/app.py", line 1523, in full_dispatch_request
May 21 19:55:12 debian whoogle[143677]:     rv = self.dispatch_request()
May 21 19:55:12 debian whoogle[143677]:   File "/home/whoogle/.local/lib/python3.9/site-packages/flask/app.py", line 1509, in dispatch_request
May 21 19:55:12 debian whoogle[143677]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
May 21 19:55:12 debian whoogle[143677]:   File "/home/whoogle/.local/lib/python3.9/site-packages/app/routes.py", line 79, in decorated
May 21 19:55:12 debian whoogle[143677]:     _ = pickle.load(session_file)
May 21 19:55:12 debian whoogle[143677]: _pickle.UnpicklingError: invalid load key, '\xa3'.
Originally created by @PrivacyDevel on GitHub (May 22, 2022). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/765 **Describe the bug** Whoogle Search displays "Internal Server Error" in the browser whenever I use it to make any search. The home page gets displayed correctly and the problem seems to be specific to installations using pip. The manual installation using git and venv is working however. **Server OS** Debian 11.3 **To Reproduce** 1. Search for anything using Whoogle Search 2. See "Internal Server Error" in client 3. Check logs to find Tracebacks **Deployment Method** - [ ] Heroku (one-click deploy) - [ ] Docker - [ ] `run` executable - [x] pip - [ ] Other: [describe setup] **Version of Whoogle Search** - [ ] Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc) - [x] Version [0.7.2] - [ ] Not sure **Client:** The problem does not seem to be browser specific. It happened with Firefox and curl for example. **Traceback from logs** ``` May 21 19:55:12 debian whoogle[143677]: ERROR:app:Exception on /search [POST] May 21 19:55:12 debian whoogle[143677]: Traceback (most recent call last): May 21 19:55:12 debian whoogle[143677]: File "/home/whoogle/.local/lib/python3.9/site-packages/flask/app.py", line 2077, in wsgi_app May 21 19:55:12 debian whoogle[143677]: response = self.full_dispatch_request() May 21 19:55:12 debian whoogle[143677]: File "/home/whoogle/.local/lib/python3.9/site-packages/flask/app.py", line 1525, in full_dispatch_request May 21 19:55:12 debian whoogle[143677]: rv = self.handle_user_exception(e) May 21 19:55:12 debian whoogle[143677]: File "/home/whoogle/.local/lib/python3.9/site-packages/flask/app.py", line 1523, in full_dispatch_request May 21 19:55:12 debian whoogle[143677]: rv = self.dispatch_request() May 21 19:55:12 debian whoogle[143677]: File "/home/whoogle/.local/lib/python3.9/site-packages/flask/app.py", line 1509, in dispatch_request May 21 19:55:12 debian whoogle[143677]: return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) May 21 19:55:12 debian whoogle[143677]: File "/home/whoogle/.local/lib/python3.9/site-packages/app/routes.py", line 79, in decorated May 21 19:55:12 debian whoogle[143677]: _ = pickle.load(session_file) May 21 19:55:12 debian whoogle[143677]: _pickle.UnpicklingError: invalid load key, '\xa3'. ```
kerem 2026-02-25 20:35:52 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@DragonEggBedrockBreaking commented on GitHub (May 30, 2022):

Confirmed with both pip (latest release) and pipx (from source).
Confirmed with librewolf browser.

<!-- gh-comment-id:1141017047 --> @DragonEggBedrockBreaking commented on GitHub (May 30, 2022): Confirmed with both pip (latest release) and pipx (from source). Confirmed with librewolf browser.
Author
Owner

@nobicycle commented on GitHub (Jun 1, 2022):

Confirm also:

 * Debugger PIN: 404-855-552
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/autocomplete.7b431467.js HTTP/1.1" 304 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/logo.72c3bd56.css HTTP/1.1" 304 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/controller.2b641ebb.js HTTP/1.1" 304 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/main.68be5054.css HTTP/1.1" 304 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/light-theme.67298ff0.css HTTP/1.1" 304 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/dark-theme.2f2258ef.css HTTP/1.1" 304 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/img/favicon/manifest.json HTTP/1.1" 307 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/img/favicon/favicon-32x32.png HTTP/1.1" 304 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /session/8a304b51-efd9-4837-91dd-95a5d5edb8e9?follow=http%3A%2F%2F127.0.0.1%3A8754%2Fstatic%2Fimg%2Ffavicon%2Fmanifest.json HTTP/1.1" 307 -
127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/img/favicon/manifest.json?cookies_disabled=1 HTTP/1.1" 304 -
127.0.0.1 - - [01/Jun/2022 09:14:05] "POST /search HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 2095, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/werkzeug/middleware/proxy_fix.py", line 187, in __call__
    return self.app(environ, start_response)
  File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 2080, in wsgi_app
    response = self.handle_exception(e)
  File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 1525, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/app/routes.py", line 79, in decorated
    _ = pickle.load(session_file)
_pickle.UnpicklingError: invalid load key, '?'.

<!-- gh-comment-id:1142975395 --> @nobicycle commented on GitHub (Jun 1, 2022): Confirm also: ``` * Debugger PIN: 404-855-552 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/autocomplete.7b431467.js HTTP/1.1" 304 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/logo.72c3bd56.css HTTP/1.1" 304 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/controller.2b641ebb.js HTTP/1.1" 304 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/main.68be5054.css HTTP/1.1" 304 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/light-theme.67298ff0.css HTTP/1.1" 304 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/build/dark-theme.2f2258ef.css HTTP/1.1" 304 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/img/favicon/manifest.json HTTP/1.1" 307 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/img/favicon/favicon-32x32.png HTTP/1.1" 304 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /session/8a304b51-efd9-4837-91dd-95a5d5edb8e9?follow=http%3A%2F%2F127.0.0.1%3A8754%2Fstatic%2Fimg%2Ffavicon%2Fmanifest.json HTTP/1.1" 307 - 127.0.0.1 - - [01/Jun/2022 09:13:58] "GET /static/img/favicon/manifest.json?cookies_disabled=1 HTTP/1.1" 304 - 127.0.0.1 - - [01/Jun/2022 09:14:05] "POST /search HTTP/1.1" 500 - Traceback (most recent call last): File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 2095, in __call__ return self.wsgi_app(environ, start_response) File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/werkzeug/middleware/proxy_fix.py", line 187, in __call__ return self.app(environ, start_response) File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 2080, in wsgi_app response = self.handle_exception(e) File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/home/user/Development/Python/whoogle-search/lib/python3.10/site-packages/app/routes.py", line 79, in decorated _ = pickle.load(session_file) _pickle.UnpicklingError: invalid load key, '?'. ```
Author
Owner

@benbusby commented on GitHub (Jun 3, 2022):

Thanks for reporting, it should be fixed now. There should be a new pip version (0.7.3) available shortly.

<!-- gh-comment-id:1146339666 --> @benbusby commented on GitHub (Jun 3, 2022): Thanks for reporting, it should be fixed now. There should be a new pip version (0.7.3) available shortly.
Author
Owner

@nobicycle commented on GitHub (Jun 6, 2022):

Confirm solved. Thanks!

<!-- gh-comment-id:1147029123 --> @nobicycle commented on GitHub (Jun 6, 2022): Confirm solved. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#484
No description provided.