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 <
override-none-encoding.patch".
François
diff -rN -u old-tahoe/src/allmydata/util/stringutils.py new-tahoe/src/allmydata/util/stringutils.py
--- old-tahoe/src/allmydata/util/stringutils.py 2009-02-25 13:56:05.000000000 +0100
+++ new-tahoe/src/allmydata/util/stringutils.py 2009-02-25 13:56:05.000000000 +0100
@@ -67,4 +67,5 @@
"""
precondition(isinstance(s, unicode), s)
- return s.encode(sys.stdout.encoding, 'replace')
+ encoding = sys.stdout.encoding or 'ascii'
+ return s.encode(encoding, 'replace')
_______________________________________________
tahoe-dev mailing list
[email protected]
http://allmydata.org/cgi-bin/mailman/listinfo/tahoe-dev