#681 closed defect (duplicate)
make the error message more helpful in case of no 'tahoe' alias
Reported by: | prmr | Owned by: | davidsarah |
---|---|---|---|
Priority: | major | Milestone: | 1.6.1 |
Component: | code-frontend-cli | Version: | 1.5.0 |
Keywords: | easy usability error | Cc: | david-sarah@… |
Launchpad Bug: |
Description
root@lodge:~/.tahoe# tahoe stats Traceback (most recent call last): File "/usr/bin/tahoe", line 8, in <module> load_entry_point('allmydata-tahoe==1.3.0', 'console_scripts', 'tahoe')() File "/usr/lib/python2.5/site-packages/allmydata_tahoe-1.3.0-py2.5.egg/allmydata/scripts/runner.py", line 91, in run rc = runner(sys.argv[1:]) File "/usr/lib/python2.5/site-packages/allmydata_tahoe-1.3.0-py2.5.egg/allmydata/scripts/runner.py", line 78, in runner rc = cli.dispatch[command](so) File "/usr/lib/python2.5/site-packages/allmydata_tahoe-1.3.0-py2.5.egg/allmydata/scripts/cli.py", line 374, in stats rc = tahoe_manifest.stats(options) File "/usr/lib/python2.5/site-packages/allmydata_tahoe-1.3.0-py2.5.egg/allmydata/scripts/tahoe_manifest.py", line 128, in stats return StatsGrabber().run(options) File "/usr/lib/python2.5/site-packages/allmydata_tahoe-1.3.0-py2.5.egg/allmydata/scripts/slow_operation.py", line 20, in run rootcap, path = get_alias(options.aliases, where, DEFAULT_ALIAS) File "/usr/lib/python2.5/site-packages/allmydata_tahoe-1.3.0-py2.5.egg/allmydata/scripts/common.py", line 137, in get_alias return aliases[default], path KeyError: 'tahoe'
Hi,
I'm getting this error on OS X 10.5.2 when trying to run any command minus start/stop and create-*. Anyone know why this might be?
Thanks!
Change History (9)
comment:1 Changed at 2009-08-06T12:33:31Z by zooko
- Component changed from operational to code-frontend-cli
- Keywords easy added
- Owner somebody deleted
- Summary changed from Unable to run some commands to make the error message more helpful in case of no 'tahoe' alias
comment:2 Changed at 2009-08-17T22:09:12Z by davidsarah
- Cc david-sarah@… added
- Version changed from 1.3.0 to 1.5.0
I'm getting a different exception (Tahoe 1.5.0 r4044 with Python 2.6 on Windows Vista), but I think it's probably the same issue:
>c:\Python26\Scripts\tahoe ls Traceback (most recent call last): File "c:\Python26\Scripts\tahoe-script.py", line 8, in <module> load_entry_point('allmydata-tahoe==1.5.0-r4044', 'console_scripts', 'tahoe')() File "c:\python26\lib\site-packages\allmydata_tahoe-1.5.0_r4044-py2.6.egg\allmydata\scripts\runner.py", line 91, in run rc = runner(sys.argv[1:]) File "c:\python26\lib\site-packages\allmydata_tahoe-1.5.0_r4044-py2.6.egg\allmydata\scripts\runner.py", line 47, in runner config.parseOptions(argv) File "c:\python26\lib\site-packages\twisted-8.2.0-py2.6-win32.egg\twisted\python\usage.py", line 231, in parseOptions self.subOptions.parseOptions(rest) File "c:\python26\lib\site-packages\twisted-8.2.0-py2.6-win32.egg\twisted\python\usage.py", line 241, in parseOptions self.postOptions() File "c:\python26\lib\site-packages\allmydata_tahoe-1.5.0_r4044-py2.6.egg\allmydata\scripts\cli.py", line 39, in postOptions node_url_file = os.path.join(self['node-directory'], "node.url") File "c:\python26\lib\ntpath.py", line 96, in join assert len(path) > 0 TypeError: object of type 'NoneType' has no len()
comment:3 Changed at 2009-11-21T06:33:42Z by davidsarah
- Keywords usability added
- Milestone changed from undecided to 1.6.0
comment:4 Changed at 2009-12-20T01:12:12Z by davidsarah
- Owner set to davidsarah
comment:5 Changed at 2010-01-16T01:10:17Z by davidsarah
- Keywords error added
comment:6 Changed at 2010-01-26T15:43:34Z by zooko
- Milestone changed from 1.6.0 to eventually
comment:7 Changed at 2010-02-01T19:43:25Z by davidsarah
- Milestone changed from eventually to 1.7.0
comment:8 Changed at 2010-02-08T05:05:20Z by davidsarah
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #939 (actually the other way around, but that ticket has more information).
comment:9 Changed at 2010-02-15T18:47:38Z by davidsarah
- Milestone changed from 1.7.0 to 1.6.1
The error in comment:2 wasn't the same issue; it was due to --node-directory not being set (on Windows there is no default node directory when the registry entry set by the allmydata.com client is not present). I'll open another ticket for that.
Note: See
TracTickets for help on using
tickets.
Thanks for the bug report, prmr. I'm sorry that it fell by the wayside for four months -- I don't know if I ever noticed this ticket before now. I'm changing the title to reflect what I think is the issue here -- that the error message when there is no alias registered for 'tahoe' should be more helpful and explain that the tahoe stats command expects either a dircap or an alias on the command-line, or else for there to be a dircap registered under the default 'tahoe' alias in the aliases file.
I'm also marking this ticket as "easy" -- a young hacker who wants to get into Tahoe-LAFS hacking should be able to fix this ticket easily enough even if they aren't familiar with the codebase.