[tahoe-dev] [tahoe-lafs] #734: Tahoe CLI with unicode patches applied fails when stdout is redirected

Andrej Falout andrej at falout.org
Wed Aug 5 11:04:18 UTC 2009


Thanks for that, I'll try it out - first apply the Unicode patch, then this
one?

Should I still use unicode patch files used on 1.4.1 attached to
http://allmydata.org/trac/tahoe/raw-attachment/ticket/534 ? Will they apply
cleanly?

In the meantime, can anyone please help me with :

Command:

/usr/bin/python /usr/src/tahoe/darcs/09-08-05_18-15/tahoe/bin/tahoe backup
--node-directory=/home/andrej/.tahoe-allmydata.com/ --verbose
"/data/audio/Music/A Capella" tahoe:"Backups/polar/data/audio/Music/A
Capella"

...

uploading /data/audio/Music/A Capella/Whitney Houston-My Love Is Your Love
(Accapella - Acapella -.mp3..
 /data/audio/Music/A Capella/Whitney Houston-My Love Is Your Love (Accapella
- Acapella -.mp3 ->
URI:CHK:w4tjhso54lat5e5oorrzv7kh7a:x3ljsbhl4bix4rxbmrtse7ppze4pxut3axovi73jz5lsu2zqrcpa:3:10:5570740
Traceback (most recent call last):
  File "/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/support/bin/tahoe", line
8, in <module>
    load_entry_point('allmydata-tahoe==1.5.0-r4043', 'console_scripts',
'tahoe')()
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/runner.py",
line 91, in run
    rc = runner(sys.argv[1:])
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/runner.py",
line 78, in runner
    rc = cli.dispatch[command](so)
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/cli.py",
line 456, in backup
    rc = tahoe_backup.backup(options)
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/tahoe_backup.py",
line 370, in backup
    return bu.run()
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/tahoe_backup.py",
line 212, in run
    new_backup_dircap = self.process(options.from_dir, latest_backup_dircap)
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/tahoe_backup.py",
line 265, in process
    newfilecap, metadata = self.upload(childpath)
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/tahoe_backup.py",
line 344, in upload
    must_upload, bdb_results = self.check_backupdb(childpath)
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/tahoe_backup.py",
line 290, in check_backupdb
    r = self.backupdb.check_file(childpath, use_timestamps)
  File
"/usr/src/tahoe/darcs/09-08-05_18-15/tahoe/src/allmydata/scripts/backupdb.py",
line 167, in check_file
    (path,))
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use
a text_factory that can interpret 8-bit bytestrings (like text_factory =
str). It is highly recommended that you instead just switch your application
to Unicode strings.


/usr/bin/python /usr/src/tahoe/darcs/09-08-05_18-15/tahoe/bin/tahoe
--version :

allmydata-tahoe: 1.5.0-r4043, foolscap: 0.4.2, pycryptopp: 0.5.16, zfec:
1.4.4, Twisted: 8.2.0, Nevow: 0.9.32, zope.interface: 3.5.0, python: 2.6.0,
platform: Linux-SuSE_11.1-x86_64-64bit_ELF, sqlite: 3.6.4, simplejson:
2.0.7, argparse: 0.8.0, pyOpenSSL: 0.7, pyutil: 1.3.30, zbase32: 1.1.1,
setuptools: 0.6c12dev, pysqlite: 2.4.1


I suspect this has nothing to do with missing Unicode patch, as the filename
in question has no characters that would be/should be unicode encoded?

Much appreciated,

Andrej Falout



On Wed, Aug 5, 2009 at 6:20 PM, Francois Deppierraz
<francois at ctrlaltdel.ch>wrote:

> Hi Andrej,
>
> Yes, the unicode patches are not yet in a good enough shape to get
> included in 1.5 and I had too much other priorities to fix it. I'll work
> to fix that before 1.6.
>
> In the meantime, the stdout issue you have can temporarily be fixed by
> applying the (untested) patch attached to this mail. You can apply it to
> your Tahoe source tree by running following command from inside the tree:
>
>  patch -p1 < unicode-stdout-quickfix.patch
>
> Please let me know how it worked out.
>
> François
>
> _______________________________________________
> tahoe-dev mailing list
> tahoe-dev at allmydata.org
> http://allmydata.org/cgi-bin/mailman/listinfo/tahoe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20090805/0e969bb6/attachment.html>


More information about the tahoe-dev mailing list