[tahoe-dev] [tahoe-lafs] #534: "tahoe cp" command encoding issue

Francois Deppierraz francois at ctrlaltdel.ch
Wed Feb 25 12:59:37 UTC 2009

Andrej Falout wrote:

>   File "/usr/src/tahoe/tahoe/src/allmydata/scripts/tahoe_backup.py",
> line 241, in verboseprint
>     print >>self.options.stdout, unicode_to_stdout(msg)
>   File "/usr/src/tahoe/tahoe/src/allmydata/util/stringutils.py", line
> 70, in unicode_to_stdout
>     return s.encode(sys.stdout.encoding, 'replace')
> TypeError: encode() argument 1 must be string, not None

Ok, it looks like Python was not able to figure out the encoding used by
your terminal. I thought that sys.stdout.encoding would return 'ascii'
instead of None in that case.

Can you try to apply the attached patch ? It's a standard patch this
time, you should be able to apply it using "patch -p1 <

-------------- next part --------------
A non-text attachment was scrubbed...
Name: override-none-encoding.patch
Type: text/x-diff
Size: 485 bytes
Desc: not available
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20090225/86868d5b/attachment.patch>

More information about the tahoe-dev mailing list