Opened at 2008-05-01T12:00:22Z
Closed at 2010-02-15T19:58:34Z
#401 closed defect (fixed)
command-line: tahoe ls's way of saying "No such file or directory" leaves something to be desired
Reported by: | zooko | Owned by: | davidsarah |
---|---|---|---|
Priority: | major | Milestone: | undecided |
Component: | code-frontend-cli | Version: | 1.0.0 |
Keywords: | usability tahoe-ls error easy | Cc: | |
Launchpad Bug: |
Description
$ bin/tahoe ls --dir-cap=URI:DIR2-RO:pgj2oefhipe2uzulz7kyvyfcbe:7xoalidet7oignxsnhra77ez7qxh6ro5humhumncabv4cghdkc2q http://127.0.0.1:8124/uri/URI%3ADIR2-RO%3Apgj2oefhipe2uzulz7kyvyfcbe%3A7xoalidet7oignxsnhra77ez7qxh6ro5humhumncabv4cghdkc2q/?t=json Traceback (most recent call last): File "/disk1.1/usr/home/ben/darcs-work/tahoe/support/bin/tahoe", line 8, in <module> load_entry_point('allmydata-tahoe==1.0.0-r2514', 'console_scripts', 'tahoe')() File "/disk1.1/usr/home/ben/darcs-work/tahoe/src/allmydata/scripts/runner.py", line 77, in run rc = runner(sys.argv[1:]) File "/disk1.1/usr/home/ben/darcs-work/tahoe/src/allmydata/scripts/runner.py", line 66, in runner rc = cli.dispatch[command](so, stdout, stderr) File "/disk1.1/usr/home/ben/darcs-work/tahoe/src/allmydata/scripts/cli.py", line 145, in list stdout, stderr) File "/disk1.1/usr/home/ben/darcs-work/tahoe/src/allmydata/scripts/tahoe_ls.py", line 15, in list parsed = simplejson.loads(data) File "/disk1.1/usr/home/ben/darcs-work/tahoe/support/lib/python2.5/site-packages/simplejson-1.7.3-py2.5-freebsd-6.3-STABLE-i386.egg/simplejson/__init__.py", line 262, in loads return _default_decoder.decode(s) File "/disk1.1/usr/home/ben/darcs-work/tahoe/support/lib/python2.5/site-packages/simplejson-1.7.3-py2.5-freebsd-6.3-STABLE-i386.egg/simplejson/decoder.py", line 251, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/disk1.1/usr/home/ben/darcs-work/tahoe/support/lib/python2.5/site-packages/simplejson-1.7.3-py2.5-freebsd-6.3-STABLE-i386.egg/simplejson/decoder.py", line 270, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded
When what it should have said was
$ bin/tahoe ls --dir-cap=URI:DIR2-RO:pgj2oefhipe2uzulz7kyvyfcbe:7xoalidet7oignxsnhra77ez7qxh6ro5humhumncabv4cghdkc2q http://127.0.0.1:8124/uri/URI%3ADIR2-RO%3Apgj2oefhipe2uzulz7kyvyfcbe%3A7xoalidet7oignxsnhra77ez7qxh6ro5humhumncabv4cghdkc2q/?t=json tahoe ls: http://127.0.0.1:8124/uri/URI%3ADIR2-RO%3Apgj2oefhipe2uzulz7kyvyfcbe%3A7xoalidet7oignxsnhra77ez7qxh6ro5humhumncabv4cghdkc2q: No such file or directory
Change History (6)
comment:1 Changed at 2008-05-01T18:13:16Z by warner
comment:2 Changed at 2009-12-13T05:14:39Z by davidsarah
- Keywords usability tahoe-ls added
comment:3 Changed at 2010-01-16T01:11:45Z by davidsarah
- Keywords error added
comment:4 Changed at 2010-02-02T02:54:36Z by davidsarah
- Keywords easy added
- Milestone changed from eventually to 1.7.0
- Owner set to davidsarah
- Status changed from new to assigned
comment:5 Changed at 2010-02-15T19:58:20Z by davidsarah
- Milestone changed from 1.7.0 to undecided
This seems to be already fixed.
comment:6 Changed at 2010-02-15T19:58:34Z by davidsarah
- Resolution set to fixed
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.
Let's start by changing the internal exception classes, to make a new NoSharesError as a narrower subset of NotEnoughSharesError. NoSharesError would be cause to show "no such file or directory", whereas NotEnoughSharesError (which would imply more than zero) is a more serious problem, closer to an IOError of some sort.