[tahoe-lafs-trac-stream] [tahoe-lafs] #1379: misparse of "tahoe cp $CAP/$PATH ."
tahoe-lafs
trac at tahoe-lafs.org
Thu Mar 17 14:49:22 PDT 2011
#1379: misparse of "tahoe cp $CAP/$PATH ."
---------------------------------+------------------------------------------
Reporter: zooko | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Component: code-frontend-cli | Version: 1.8.2
Keywords: usability cli error | Launchpad Bug:
---------------------------------+------------------------------------------
The error messages are unhelpful, but also it looks like there is a bug so
that {{{tahoe cp}}} misparses the {{{$CAP/path}}} syntax in its source
argument.
{{{
$ tahoe cp -v -r --node-url=http://localhost:3458
URI:DIR2-RO:o7mbbpxsznwfwiih5yzxmuqopq:cl72f3dnb6q7z4ajfjw24me5qwk7q7hfqrp5ho3dntuvoovspska:Latest
.
error: you must specify a destination filename
$ tahoe cp -v -r --node-url=http://localhost:3458
URI:DIR2-RO:o7mbbpxsznwfwiih5yzxmuqopq:cl72f3dnb6q7z4ajfjw24me5qwk7q7hfqrp5ho3dntuvoovspska:Latest
./Latest
attaching sources to targets, 1 files / 0 dirs in root
targets assigned, 1 dirs, 2 files
starting copy, 2 files, 1 directories
Traceback (most recent call last):
File "/Users/zooko/playground/tahoe-lafs/dw/support/bin/tahoe", line 9,
in <module>
load_entry_point('allmydata-tahoe==1.8.2-r5006', 'console_scripts',
'tahoe')()
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/runner.py", line 113, in run
rc = runner(sys.argv[1:], install_node_control=install_node_control)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/runner.py", line 99, in runner
rc = cli.dispatch[command](so)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/cli.py", line 520, in cp
rc = tahoe_cp.copy(options)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 762, in copy
return Copier().do_copy(options)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 442, in do_copy
status = self.try_copy()
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 485, in try_copy
return self.copy_to_directory(sources, target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 664, in copy_to_directory
self.copy_files_to_target(self.targetmap[target], target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 695, in
copy_files_to_target
self.copy_file_into(source, name, target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 739, in copy_file_into
f = source.open(self.caps_only)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 178, in open
url = self.nodeurl + "uri/" + urllib.quote(self.readcap)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
line 1216, in quote
res = map(safe_map.__getitem__, s)
TypeError: argument 2 to map() must support iteration
$ tahoe cp -v -r --node-url=http://localhost:3458
URI:DIR2-RO:o7mbbpxsznwfwiih5yzxmuqopq:cl72f3dnb6q7z4ajfjw24me5qwk7q7hfqrp5ho3dntuvoovspska:Latest/
.
examining 0 of 1
attaching sources to targets, 1 files / 0 dirs in root
targets assigned, 1 dirs, 2 files
starting copy, 2 files, 1 directories
Traceback (most recent call last):
File "/Users/zooko/playground/tahoe-lafs/dw/support/bin/tahoe", line 9,
in <module>
load_entry_point('allmydata-tahoe==1.8.2-r5006', 'console_scripts',
'tahoe')()
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/runner.py", line 113, in run
rc = runner(sys.argv[1:], install_node_control=install_node_control)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/runner.py", line 99, in runner
rc = cli.dispatch[command](so)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/cli.py", line 520, in cp
rc = tahoe_cp.copy(options)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 762, in copy
return Copier().do_copy(options)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 442, in do_copy
status = self.try_copy()
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 503, in try_copy
return self.copy_to_directory(sources, target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 664, in copy_to_directory
self.copy_files_to_target(self.targetmap[target], target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 695, in
copy_files_to_target
self.copy_file_into(source, name, target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 739, in copy_file_into
f = source.open(self.caps_only)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 178, in open
url = self.nodeurl + "uri/" + urllib.quote(self.readcap)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
line 1216, in quote
res = map(safe_map.__getitem__, s)
TypeError: argument 2 to map() must support iteration
$ tahoe cp -v -r --node-url=http://localhost:3458
URI:DIR2-RO:o7mbbpxsznwfwiih5yzxmuqopq:cl72f3dnb6q7z4ajfjw24me5qwk7q7hfqrp5ho3dntuvoovspska:Latest/
./Latest
attaching sources to targets, 1 files / 0 dirs in root
targets assigned, 1 dirs, 2 files
starting copy, 2 files, 1 directories
Traceback (most recent call last):
File "/Users/zooko/playground/tahoe-lafs/dw/support/bin/tahoe", line 9,
in <module>
load_entry_point('allmydata-tahoe==1.8.2-r5006', 'console_scripts',
'tahoe')()
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/runner.py", line 113, in run
rc = runner(sys.argv[1:], install_node_control=install_node_control)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/runner.py", line 99, in runner
rc = cli.dispatch[command](so)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/cli.py", line 520, in cp
rc = tahoe_cp.copy(options)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 762, in copy
return Copier().do_copy(options)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 442, in do_copy
status = self.try_copy()
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 503, in try_copy
return self.copy_to_directory(sources, target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 664, in copy_to_directory
self.copy_files_to_target(self.targetmap[target], target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 695, in
copy_files_to_target
self.copy_file_into(source, name, target)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 739, in copy_file_into
f = source.open(self.caps_only)
File "/Users/zooko/playground/tahoe-
lafs/dw/src/allmydata/scripts/tahoe_cp.py", line 178, in open
url = self.nodeurl + "uri/" + urllib.quote(self.readcap)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py",
line 1216, in quote
res = map(safe_map.__getitem__, s)
TypeError: argument 2 to map() must support iteration
}}}
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1379>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list