﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
1379	"poor error message for wrong path syntax, e.g. ""tahoe cp $CAP:$PATH ."""	zooko	davidsarah	"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
}}}"	defect	closed	major	eventually	code-frontend-cli	1.8.2	duplicate	usability cli error easy		
