#1071 assigned defect

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

Reported by: np Owned by: davidsarah
Priority: major Milestone: soon
Component: code-frontend-cli Version: 1.6.1
Keywords: tahoe-mv usability error easy Cc:
Launchpad Bug:

Description

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)

Change History (7)

comment:1 Changed at 2010-06-08T02:33:22Z by davidsarah

  • Keywords tahoe-mv usability error easy added
  • Milestone changed from undecided to 1.8.0
  • Priority changed from minor to major
  • Version changed from n/a to 1.6.1

comment:2 Changed at 2010-06-08T03:46:23Z by davidsarah

Special case of #1048.

comment:3 Changed at 2010-08-14T06:44:05Z by zooko

  • Milestone changed from 1.8.0 to eventually

comment:4 Changed at 2010-08-14T20:24:05Z by davidsarah

  • Milestone changed from eventually to soon

comment:5 Changed at 2010-08-14T20:24:39Z by davidsarah

  • Owner set to davidsarah
  • Status changed from new to assigned

comment:6 Changed at 2011-08-17T04:31:06Z by davidsarah

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.

comment:7 Changed at 2011-08-17T04:43:07Z by davidsarah

  • Milestone changed from soon to 1.10.0
Note: See TracTickets for help on using tickets.