Open benfoley opened 4 years ago
➜ ~ docker run --rm -p 5000:5000/tcp coedl/elpis:interspeech-19
* Serving Flask app "elpis" (lazy loading)
* Environment: development
* Debug mode: on
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 256-589-515
172.17.0.1 - - [31/Jan/2020 13:29:51] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
StopIteration: 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/elpis/venv/lib/python3.6/site-packages/Flask-1.1.1-py3.6.egg/flask/_compat.py", line 39, in reraise
raise value
File "/elpis/venv/lib/python3.6/site-packages/Flask-1.1.1-py3.6.egg/flask/cli.py", line 83, in find_best_app
app = call_factory(script_info, app_factory)
File "/elpis/venv/lib/python3.6/site-packages/Flask-1.1.1-py3.6.egg/flask/cli.py", line 119, in call_factory
return app_factory()
File "/elpis/elpis/__init__.py", line 49, in create_app
app.config['INTERFACE'] = KaldiInterface(interface_path)
File "/elpis/elpis/wrappers/objects/interface.py", line 31, in __init__
dir_name=path.name
File "/elpis/elpis/wrappers/objects/fsobject.py", line 40, in __init__
self.config['hash'] = h
File "/elpis/elpis/wrappers/objects/fsobject.py", line 119, in __setitem__
config = self._load()
File "/elpis/elpis/wrappers/objects/fsobject.py", line 109, in _load
return json.load(fin)
File "/usr/lib/python3.6/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Looks like this could be a race condition, but I have to ask, what is the reasoning behind this fsboject code?
Difficult to repeat this error, occasionally when opening the 0.0.0.0/5000 address in a browser I get a JSON decode error. Reloading the address moments after loads the page as expected.