[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3738: `tahoe cp` upload with Unicode name fails on Python 2

Tahoe-LAFS trac at tahoe-lafs.org
Tue Jun 15 17:09:50 UTC 2021


#3738: `tahoe cp` upload with Unicode name fails on Python 2
--------------------------+------------------------------
     Reporter:  itamarst  |      Owner:  itamarst
         Type:  defect    |     Status:  new
     Priority:  normal    |  Milestone:  Support Python 3
    Component:  unknown   |    Version:  n/a
   Resolution:            |   Keywords:
Launchpad Bug:            |
--------------------------+------------------------------

Comment (by itamarst):

 The errors are somewhat interleaved, unfortunately, but looks like there
 were errors in both the web code _and_ tahoe cp:

 ~~~
 /home/itamarst/Devel/tahoe-lafs/src/allmydata/scripts/runner.py:207:
 UnicodeWarning: Unicode equal comparison failed to convert both arguments
 to Unicode - interpreting them as being unequal  if '--coverage' not in
 sys.argv:
 2021-06-15T13:01:23-0400 [allmydata.webish.TahoeLAFSRequest#critical]
         Traceback (most recent call last):
           File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7
 /site-packages/twisted/internet/base.py", line 913, in runUntilCurrent
             call.func(*call.args, **call.kw)
           File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-
 packages/foolscap/eventual.py", line 26, in _turn
             cb(*args, **kwargs)
           File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7
 /site-packages/twisted/internet/defer.py", line 460, in callback
             self._startRunCallbacks(result)
           File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7
 /site-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
             self._runCallbacks()
         --- <exception caught here> ---
           File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7
 /site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
             current.result = callback(current.result, *args, **kw)
           File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-
 packages/eliot/twisted.py", line 96, in errbackWithContext
             return self._action.run(errback, *args, **kwargs)
           File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-
 packages/eliot/_action.py", line 467, in run
             return f(*args, **kwargs)
           File "/home/itamarst/Devel/tahoe-
 lafs/src/allmydata/web/common.py", line 504, in _getChild_failed
             text, code = humanize_failure(reason)
           File "/home/itamarst/Devel/tahoe-
 lafs/src/allmydata/web/common.py", line 411, in humanize_failure
             return humanize_exception(f.value)
           File "/home/itamarst/Devel/tahoe-
 lafs/src/allmydata/web/common.py", line 328, in humanize_exception
             return ("No such child: %s" % quoted_name, http.NOT_FOUND)
         exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte
 0xe2 in position 5: ordinal not in range(128)

 2021-06-15T13:01:23-0400 [twisted.python.log#info] web: 127.0.0.1 GET
 /uri/[CENSORED]?t=json 500 95
 Traceback (most recent call last):
   File "/usr/lib64/python2.7/threading.py", line 804, in __bootstrap_inner
     self.run()
   File "/usr/lib64/python2.7/threading.py", line 757, in run
     self.__target(*self.__args, **self.__kwargs)
   File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7/site-
 packages/twisted/_threads/_threadworker.py", line 46, in work
     task()
   File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7/site-
 packages/twisted/_threads/_team.py", line 190, in doWork
     task()
 --- <exception caught here> ---
   File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7/site-
 packages/twisted/python/threadpool.py", line 250, in inContext
     result = inContext.theWork()
   File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7/site-
 packages/twisted/python/threadpool.py", line 266, in <lambda>
     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
   File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7/site-
 packages/twisted/python/context.py", line 122, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/home/itamarst/Devel/tahoe-lafs/venv27/lib64/python2.7/site-
 packages/twisted/python/context.py", line 85, in callWithContext
     return func(*args,**kw)
   File "/home/itamarst/Devel/tahoe-lafs/src/allmydata/scripts/cli.py",
 line 542, in cp
     rc = tahoe_cp.copy(options)
   File "/home/itamarst/Devel/tahoe-
 lafs/src/allmydata/scripts/tahoe_cp.py", line 888, in copy
     return Copier().do_copy(options)
   File "/home/itamarst/Devel/tahoe-
 lafs/src/allmydata/scripts/tahoe_cp.py", line 508, in do_copy
     status = self.try_copy()
   File "/home/itamarst/Devel/tahoe-
 lafs/src/allmydata/scripts/tahoe_cp.py", line 527, in try_copy
     target = self.get_target_info(destination_spec)
   File "/home/itamarst/Devel/tahoe-
 lafs/src/allmydata/scripts/tahoe_cp.py", line 648, in get_target_info
     % quote_output(destination_spec), resp)
 exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in
 position 16: ordinal not in range(128)
 ~~~

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3738#comment:1>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list