Page MenuHomePhabricator

Error: No JSON object could be decoded
Closed, ResolvedPublic

Description

At https://tools.wmflabs.org/oabot/process?name=2015_in_paleontology (a rather heavy page):

Oops! Something went wrong.

Error:
No JSON object could be decoded
Traceback (most recent call last):
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/data/project/oabot/www/python/src/app.py", line 122, in process
context = get_proposed_edits(page_name, force)
File "/data/project/oabot/www/python/src/app.py", line 206, in get_proposed_edits
filtered = list(filter(lambda e: e.proposed_change, all_templates))
File "./main.py", line 283, in add_oa_links_in_references
edit.propose_change()
File "./main.py", line 103, in propose_change
link = get_oa_link(reference)
File "./main.py", line 222, in get_oa_link
resp = req.json()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/requests/models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Event Timeline

Nemo_bis created this task.Oct 24 2017, 1:58 PM
Ocaasi_WMF triaged this task as Medium priority.Oct 25 2017, 7:24 PM
Nemo_bis closed this task as Resolved.Apr 21 2018, 10:00 AM

This was fixed at some point. A suggestion was correctly generated:

$ stat ~/www/python/src/cache/2015_in_paleontology.json
  File: ‘/data/project/oabot/www/python/src/cache/2015_in_paleontology.json’
  Size: 8160            Blocks: 16         IO Block: 1048576 regular file
Device: 20h/32d Inode: 119351899   Links: 1
Access: (0644/-rw-r--r--)  Uid: (52920/tools.oabot)   Gid: (52920/tools.oabot)
Access: 2018-04-21 09:54:21.713825933 +0000
Modify: 2018-04-21 09:54:21.713825933 +0000
Change: 2018-04-21 09:54:21.713825933 +0000
 Birth: -

I saw it displayed correctly and the edit was made correctly: https://en.wikipedia.org/w/index.php?title=2015_in_paleontology&diff=prev&oldid=837517904