Actions
Bug #14884
closedarv-put doesn't handle non-ASCII filenames correctly
Story points:
-
Release:
Release relationship:
Auto
Description
Attempting to upload a directory containing a file with non-ASCII characters in it's name causes arv-put to fail:
$ touch "foö.txt" $ ls foö.txt $ arv-put --version /usr/bin/arv-put 1.2.1.20181130020805 $ arv-put . 2019-02-25 16:15:05 arvados.arv_put[99848] INFO: Calculating upload size, this could take some time... 2019-02-25 16:15:05 arvados.arv_put[99848] INFO: Creating new cache file at /home/tfmorris/.cache/arvados/arv-put/1772ebabb1791856f3faef5c84d335e2 0 Traceback (most recent call last): File "/usr/bin/arv-put", line 7, in <module> main() File "/usr/lib/python2.7/dist-packages/arvados/commands/put.py", line 1158, in main writer.start(save_collection=not(args.stream or args.raw)) File "/usr/lib/python2.7/dist-packages/arvados/commands/put.py", line 601, in start self._local_collection.manifest_text() File "/usr/lib/python2.7/dist-packages/arvados/arvfile.py", line 273, in synchronized_wrapper return orig_func(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/arvados/collection.py", line 992, in manifest_text only_committed=only_committed) File "/usr/lib/python2.7/dist-packages/arvados/arvfile.py", line 273, in synchronized_wrapper return orig_func(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/arvados/collection.py", line 1038, in _get_manifest_text buf.append(self[dirname].manifest_text(stream_name=os.path.join(stream_name, dirname), strip=strip, normalize=True, only_committed=only_committed)) File "/usr/lib/python2.7/dist-packages/arvados/arvfile.py", line 273, in synchronized_wrapper return orig_func(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/arvados/collection.py", line 992, in manifest_text only_committed=only_committed) File "/usr/lib/python2.7/dist-packages/arvados/arvfile.py", line 273, in synchronized_wrapper return orig_func(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/arvados/collection.py", line 1036, in _get_manifest_text buf.append(" ".join(normalize_stream(stream_name, stream)) + "\n") File "/usr/lib/python2.7/dist-packages/arvados/_normalize_stream.py", line 58, in normalize_stream stream_tokens.append("0:0:{0}".format(fout)) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 2: ordinal not in range(128)
Actions