"No JSON object could be decoded" backtrace on tahoe mv #1071

Open
opened 2010-06-07 21:32:00 +00:00 by np · 2 comments
Owner

The following command:

tahoe mv tahoe:'do not exists' baz

Yields:

Traceback (most recent call last):
  File "/home/ertai/w/a/tahoe/support/bin/tahoe", line 8, in <module>
    load_entry_point('allmydata-tahoe==1.6.1-r4442', 'console_scripts', 'tahoe')()
  File "/home/ertai/w/a/tahoe/src/allmydata/scripts/runner.py", line 102, in run
    rc = runner(sys.argv[1:])
  File "/home/ertai/w/a/tahoe/src/allmydata/scripts/runner.py", line 89, in runner
    rc = cli.dispatch[command](so)
  File "/home/ertai/w/a/tahoe/src/allmydata/scripts/cli.py", line 500, in mv
    rc = tahoe_mv.mv(options, mode="move")
  File "/home/ertai/w/a/tahoe/src/allmydata/scripts/tahoe_mv.py", line 32, in mv
    nodetype, attrs = simplejson.loads(data)
  File "/home/ertai/w/a/tahoe/support/lib/python2.6/site-packages/simplejson-2.1.1-py2.6-linux-x86_64.egg/simplejson/__init__.py", line 384, in loads
    return _default_decoder.decode(s)
  File "/home/ertai/w/a/tahoe/support/lib/python2.6/site-packages/simplejson-2.1.1-py2.6-linux-x86_64.egg/simplejson/decoder.py", line 402, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/ertai/w/a/tahoe/support/lib/python2.6/site-packages/simplejson-2.1.1-py2.6-linux-x86_64.egg/simplejson/decoder.py", line 420, in raw_decode
    raise JSONDecodeError("No JSON object could be decoded", s, idx)
simplejson.decoder.JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
The following command: ``` tahoe mv tahoe:'do not exists' baz ``` Yields: ``` Traceback (most recent call last): File "/home/ertai/w/a/tahoe/support/bin/tahoe", line 8, in <module> load_entry_point('allmydata-tahoe==1.6.1-r4442', 'console_scripts', 'tahoe')() File "/home/ertai/w/a/tahoe/src/allmydata/scripts/runner.py", line 102, in run rc = runner(sys.argv[1:]) File "/home/ertai/w/a/tahoe/src/allmydata/scripts/runner.py", line 89, in runner rc = cli.dispatch[command](so) File "/home/ertai/w/a/tahoe/src/allmydata/scripts/cli.py", line 500, in mv rc = tahoe_mv.mv(options, mode="move") File "/home/ertai/w/a/tahoe/src/allmydata/scripts/tahoe_mv.py", line 32, in mv nodetype, attrs = simplejson.loads(data) File "/home/ertai/w/a/tahoe/support/lib/python2.6/site-packages/simplejson-2.1.1-py2.6-linux-x86_64.egg/simplejson/__init__.py", line 384, in loads return _default_decoder.decode(s) File "/home/ertai/w/a/tahoe/support/lib/python2.6/site-packages/simplejson-2.1.1-py2.6-linux-x86_64.egg/simplejson/decoder.py", line 402, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/ertai/w/a/tahoe/support/lib/python2.6/site-packages/simplejson-2.1.1-py2.6-linux-x86_64.egg/simplejson/decoder.py", line 420, in raw_decode raise JSONDecodeError("No JSON object could be decoded", s, idx) simplejson.decoder.JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0) ```
tahoe-lafs added the
code-frontend-cli
minor
defect
n/a
labels 2010-06-07 21:32:00 +00:00
tahoe-lafs added this to the undecided milestone 2010-06-07 21:32:00 +00:00
tahoe-lafs added
major
1.6.1
and removed
minor
n/a
labels 2010-06-08 02:33:22 +00:00
tahoe-lafs modified the milestone from undecided to 1.8.0 2010-06-08 02:33:22 +00:00
davidsarah commented 2010-06-08 03:46:23 +00:00
Author
Owner

Special case of #1048.

Special case of #1048.
zooko modified the milestone from 1.8.0 to eventually 2010-08-14 06:44:05 +00:00
tahoe-lafs modified the milestone from eventually to soon 2010-08-14 20:24:05 +00:00
davidsarah commented 2011-08-17 04:31:06 +00:00
Author
Owner

With trunk, I get:

$ bin/tahoe mv tahoe:'do not exists' baz
Error: 404 Not Found
No such child: do not exists

Can anyone reproduce the error in the description?

TODO: confirm that this is fixed by:

  • looking at what was wrong with the JSON returned by a 1.6.1 gateway, and checking that a more recent gateway returns correct JSON;
  • possibly adding a unit test.
With trunk, I get: ``` $ bin/tahoe mv tahoe:'do not exists' baz Error: 404 Not Found No such child: do not exists ``` Can anyone reproduce the error in the description? TODO: confirm that this is fixed by: * looking at what was wrong with the JSON returned by a 1.6.1 gateway, and checking that a more recent gateway returns correct JSON; * possibly adding a unit test.
tahoe-lafs modified the milestone from soon to 1.10.0 2011-08-17 04:43:07 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1071
No description provided.