cryptoadvance / cryptoadvance/specter-desktop
Internal Server Error / Crash - babel data files not available
- Dominant language
- Python
- Stars
- 847
- Forks
- 259
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
I had specter open for a few days. I clicked the red ghost to go home, and got internal server error white screen. OSX with internal specter node. The node seems to have gone offline.
```
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "flask/app.py", line 2077, in wsgi_app
File "flask/app.py", line 1525, in full_dispatch_request
File "flask/app.py", line 1391, in handle_user_exception
File "cryptoadvance/specter/server_endpoints/controller.py", line 107, in server_error
File "flask/templating.py", line 149, in render_template
File "jinja2/environment.py", line 1081, in get_or_select_template
File "jinja2/environment.py", line 1010, in get_template
File "jinja2/environment.py", line 969, in _load_template
File "jinja2/loaders.py", line 126, in load
File "flask/templating.py", line 59, in get_source
File "flask/templating.py", line 95, in _get_source_fast
jinja2.exceptions.TemplateNotFound: 500.jinja
2022-10-07T14:34:15.066Z [info] : stderr-SPECTERD: ERROR in controller: Uncaught exception: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
2022-10-07T14:34:15.067Z [info] : stderr-SPECTERD: ERROR in controller: Traceback (most recent call last):
File "flask/app.py", line 1523, in full_dispatch_request
File "flask/app.py", line 1509, in dispatch_request
File "flask_login/utils.py", line 269, in decorated_view
File "cryptoadvance/specter/server_endpoints/welcome.py", line 56, in about
File "flask/templating.py", line 148, in render_template
File "flask/templating.py", line 128, in _render
File "jinja2/environment.py", line 1301, in render
File "jinja2/environment.py", line 936, in handle_exception
File "/var/folders/j1/vdrqpw596qxfbp301flfgj4h0000gn/T/_MEIi2LESG/templates/base.jinja", line 5, in top-level template code
File "jinja2/ext.py", line 167, in _gettext_alias
File "jinja2/ext.py", line 173, in gettext
File "cryptoadvance/specter/htmlsafebabel.py", line 19, in
File "flask_babel/__init__.py", line 209, in get_translations
File "flask_babel/__init__.py", line 554, in get_translations
File "flask_babel/__init__.py", line 230, in get_locale
File "babel/core.py", line 302, in parse
File "babel/core.py", line 74, in get_global
File "babel/core.py", line 27, in _raise_no_data_error
RuntimeError: The babel data files are not available. This usually happens because you are using a source checkout from Babel and you did not build the data files. Just make sure to run "python setup.py import_cldr" before installing the library.
```
Contributor guide
Research direction
Start with server_endpoints/controller.py, welcome.py, and htmlsafebabel.py, then reproduce the failure after the internal Specter node goes offline. Trace the 500.jinja lookup and Babel translation path; the issue is done when this error path no longer raises TemplateNotFound or the Babel data-files RuntimeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100