[GH-ISSUE #288] [BUG] Exception due to configuration empty value parsing #196

Closed
opened 2026-02-25 20:35:08 +03:00 by kerem · 1 comment
Owner

Originally created by @github-ronk on GitHub (Apr 14, 2021).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/288

Describe the bug
After Heroku quick deploy in US region:
The application doesn't come up, and the following exception is found in the log:

2021-04-14T08:53:35.840663+00:00 app[web.1]:   File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
2021-04-14T08:53:35.840664+00:00 app[web.1]:     raise value
2021-04-14T08:53:35.840664+00:00 app[web.1]:   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1947, in full_dispatch_request
2021-04-14T08:53:35.840665+00:00 app[web.1]:     rv = self.preprocess_request()
2021-04-14T08:53:35.840665+00:00 app[web.1]:   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2241, in preprocess_request
2021-04-14T08:53:35.840666+00:00 app[web.1]:     rv = func()
2021-04-14T08:53:35.840666+00:00 app[web.1]:   File "/whoogle/app/routes.py", line 71, in before_request_func
2021-04-14T08:53:35.840667+00:00 app[web.1]:     g.user_config = Config(**session['config'])
2021-04-14T08:53:35.840667+00:00 app[web.1]:   File "/whoogle/app/models/config.py", line 23, in __init__
2021-04-14T08:53:35.840668+00:00 app[web.1]:     self.get_only = int(os.getenv('WHOOGLE_CONFIG_GET_ONLY', '0'))
2021-04-14T08:53:35.840668+00:00 app[web.1]: ValueError: invalid literal for int() with base 10: ''

To Reproduce
Steps to reproduce the behavior:

  1. Quick deploy on Heroku (in this case US region)
  2. Try to search
  3. Inspect "Internal Server Error" is the result page
  4. See error in log

Deployment Method

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

Version of Whoogle Search

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

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Originally created by @github-ronk on GitHub (Apr 14, 2021). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/288 **Describe the bug** After Heroku quick deploy in US region: The application doesn't come up, and the following exception is found in the log: ``` 2021-04-14T08:53:35.840663+00:00 app[web.1]: File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise 2021-04-14T08:53:35.840664+00:00 app[web.1]: raise value 2021-04-14T08:53:35.840664+00:00 app[web.1]: File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1947, in full_dispatch_request 2021-04-14T08:53:35.840665+00:00 app[web.1]: rv = self.preprocess_request() 2021-04-14T08:53:35.840665+00:00 app[web.1]: File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2241, in preprocess_request 2021-04-14T08:53:35.840666+00:00 app[web.1]: rv = func() 2021-04-14T08:53:35.840666+00:00 app[web.1]: File "/whoogle/app/routes.py", line 71, in before_request_func 2021-04-14T08:53:35.840667+00:00 app[web.1]: g.user_config = Config(**session['config']) 2021-04-14T08:53:35.840667+00:00 app[web.1]: File "/whoogle/app/models/config.py", line 23, in __init__ 2021-04-14T08:53:35.840668+00:00 app[web.1]: self.get_only = int(os.getenv('WHOOGLE_CONFIG_GET_ONLY', '0')) 2021-04-14T08:53:35.840668+00:00 app[web.1]: ValueError: invalid literal for int() with base 10: '' ``` **To Reproduce** Steps to reproduce the behavior: 1. Quick deploy on Heroku (in this case US region) 2. Try to search 3. Inspect "Internal Server Error" is the result page 4. See error in log **Deployment Method** - [x] Heroku (one-click deploy) - [ ] Docker - [ ] `run` executable - [ ] pip/pipx - [ ] Other: [describe setup] **Version of Whoogle Search** - [x] Latest build from [GitHub] (i.e. GitHub, Docker Hub, pip, etc) - [ ] Version [version number] - [ ] Not sure **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] **Additional context** Add any other context about the problem here.
kerem 2026-02-25 20:35:08 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@benbusby commented on GitHub (Apr 14, 2021):

Thanks for bringing this to my attention, it should be fixed now.

<!-- gh-comment-id:819577223 --> @benbusby commented on GitHub (Apr 14, 2021): Thanks for bringing this to my attention, it should be fixed now.
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#196
No description provided.