make the error message more helpful in case of no 'tahoe' alias #681

Closed
opened 2009-04-13 19:55:05 +00:00 by prmr · 4 comments
Owner
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.dispatchcommand(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](wiki/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 aliasesdefault, path
[KeyError](wiki/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!

``` 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.dispatchcommand(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](wiki/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 aliasesdefault, path [KeyError](wiki/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!
tahoe-lafs added the
operational
major
defect
1.3.0
labels 2009-04-13 19:55:05 +00:00
tahoe-lafs added this to the undecided milestone 2009-04-13 19:55:05 +00:00

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.

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.
zooko added
code-frontend-cli
and removed
operational
labels 2009-08-06 12:33:31 +00:00
zooko changed title from Unable to run some commands to make the error message more helpful in case of no 'tahoe' alias 2009-08-06 12:33:31 +00:00
davidsarah commented 2009-08-17 22:09:12 +00:00
Author
Owner

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()
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() ```
tahoe-lafs added
1.5.0
and removed
1.3.0
labels 2009-08-17 22:09:12 +00:00
tahoe-lafs modified the milestone from undecided to 1.6.0 2009-11-21 06:33:42 +00:00
zooko modified the milestone from 1.6.0 to eventually 2010-01-26 15:43:34 +00:00
tahoe-lafs modified the milestone from eventually to 1.7.0 2010-02-01 19:43:25 +00:00
davidsarah commented 2010-02-08 05:05:20 +00:00
Author
Owner

Duplicate of #939 (actually the other way around, but that ticket has more information).

Duplicate of #939 (actually the other way around, but that ticket has more information).
tahoe-lafs added the
duplicate
label 2010-02-08 05:05:20 +00:00
davidsarah commented 2010-02-15 18:47:38 +00:00
Author
Owner

The error in comment:70678 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.

The error in [comment:70678](/tahoe-lafs/trac-2024-07-25/issues/681#issuecomment-70678) 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.
tahoe-lafs modified the milestone from 1.7.0 to 1.6.1 2010-02-15 18:47:38 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 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#681
No description provided.