CLI: 'bin/tahoe @foo ...' gives misleading error message if trying to run foo raises an exception #1488

Closed
opened 2011-08-17 23:05:30 +00:00 by davidsarah · 3 comments
davidsarah commented 2011-08-17 23:05:30 +00:00
Owner
$ bin/tahoe @coverage run --branch @tahoe debug trial

gives this error:

I am a "bin/tahoe" executable who is only for the convenience of running
Tahoe from its source distribution -- I work only when invoked as the "tahoe"
script that lives in the "bin" subdirectory of a Tahoe source code
distribution, and only if you have already run "python setup.py build".

I just tried to invoke my brother at "/home/davidsarah/tahoe/snotty/support/bin/tahoe"
and got an exception.

Traceback (most recent call last):
  File "bin/tahoe", line 116, in <module>
    res = subprocess.call(command, env=os.environ)
  File "/usr/lib/python2.6/subprocess.py", line 470, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

The 'No such file or directory' error is correct, because no 'coverage' script was installed on this system. (The Ubuntu python-coverage package installs it as 'python-coverage' instead.) However the message before that complains about the wrong path, as though it were trying to invoke the support/bin/tahoe script rather than 'coverage'.

``` $ bin/tahoe @coverage run --branch @tahoe debug trial ``` gives this error: ``` I am a "bin/tahoe" executable who is only for the convenience of running Tahoe from its source distribution -- I work only when invoked as the "tahoe" script that lives in the "bin" subdirectory of a Tahoe source code distribution, and only if you have already run "python setup.py build". I just tried to invoke my brother at "/home/davidsarah/tahoe/snotty/support/bin/tahoe" and got an exception. Traceback (most recent call last): File "bin/tahoe", line 116, in <module> res = subprocess.call(command, env=os.environ) File "/usr/lib/python2.6/subprocess.py", line 470, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.6/subprocess.py", line 623, in __init__ errread, errwrite) File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory ``` The 'No such file or directory' error is correct, because no 'coverage' script was installed on this system. (The Ubuntu python-coverage package installs it as 'python-coverage' instead.) However the message before that complains about the wrong path, as though it were trying to invoke the `support/bin/tahoe` script rather than 'coverage'.
tahoe-lafs added the
code-frontend-cli
major
defect
1.8.2
labels 2011-08-17 23:05:30 +00:00
tahoe-lafs added this to the soon milestone 2011-08-17 23:05:30 +00:00
davidsarah commented 2011-08-17 23:36:28 +00:00
Author
Owner

Attachment fix-1488.darcs.patch (37892 bytes) added

bin/tahoe-script.template: fix the error message that is displayed when a runner script cannot be found. fixes #1488

**Attachment** fix-1488.darcs.patch (37892 bytes) added bin/tahoe-script.template: fix the error message that is displayed when a runner script cannot be found. fixes #1488
tahoe-lafs changed title from CLI: 'bin/tahoe @foo ...' gives misleading error message if foo doesn't exist to CLI: 'bin/tahoe @foo ...' gives misleading error message if trying to run foo raises an exception 2011-08-17 23:40:49 +00:00

This patch fixes the incorrect error message as described.

amiller@amiller-asus:~/projects/tahoe-lafs$ bin/tahoe @foo
...
I just tried to invoke my brother at "foo"
and got an exception.
This patch fixes the incorrect error message as described. ``` amiller@amiller-asus:~/projects/tahoe-lafs$ bin/tahoe @foo ... I just tried to invoke my brother at "foo" and got an exception. ```
david-sarah@jacaranda.org commented 2012-04-01 02:29:40 +00:00
Author
Owner

In changeset:07369205e1fe5a28:

bin/tahoe-script.template: fix the error message that is displayed when a runner script cannot be found. fixes #1488
In changeset:07369205e1fe5a28: ``` bin/tahoe-script.template: fix the error message that is displayed when a runner script cannot be found. fixes #1488 ```
tahoe-lafs added the
fixed
label 2012-04-01 02:29:40 +00:00
tahoe-lafs modified the milestone from soon to 1.9.0 2014-11-27 03:55:35 +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#1488
No description provided.