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

JSONDecodeError from cache browsing sub-divisions #665

Open
DaxServer opened this issue Jun 21, 2024 · 0 comments
Open

JSONDecodeError from cache browsing sub-divisions #665

DaxServer opened this issue Jun 21, 2024 · 0 comments

Comments

@DaxServer
Copy link

Hi.

While browsing https://osm.wikidata.link/browse/Q677037 the software errored out. Here is the trace printed.

Software error: JSONDecodeError
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last)
File "/usr/lib/python3/dist-packages/flask/app.py", line 1463, in wsgi_app
  response = self.full_dispatch_request()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/flask/app.py", line 872, in full_dispatch_request
  rv = self.handle_user_exception(e)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/flask/app.py", line 870, in full_dispatch_request
  rv = self.dispatch_request()
       ^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/flask/app.py", line 855, in dispatch_request
  return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/edward/src/owl-places/matcher/view.py", line 1623, in browse_page
  for entity in wikidata_api.get_entities_with_cache(contains_qids)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/edward/src/owl-places/matcher/wikidata_api.py", line 156, in get_entities_with_cache
  entity = json.load(open(cache_filename))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/__init__.py", line 293, in load
  return loads(fp.read(),
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
  return _default_decoder.decode(s)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
  obj, end = self.raw_decode(s, idx=_w(s, 0).end())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
  raise JSONDecodeError("Expecting value", s, err.value) from None
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Error in function "raw_decode": Arguments(args=['self', 's', 'idx'], varargs=None, varkw=None)

{'idx': 0, 's': '', 'self': <json.decoder.JSONDecoder object at 0x7f966ed2dcd0>}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant