[FUSE] Crashes on non-ASCII folder names
As a qr1hi admin, with a default Keep mount, trying to ls the
shared subdirectory, I get this backtrace:
2014-09-15 17:32:40 arvados.arv-mount ERROR: arv-mount: exception during mount Traceback (most recent call last): File "/data/brett/3147-retries/venv/3147/lib/python2.7/site-packages/arvados_fuse-0.1.1410798328.79e5603-py2.7.egg/EGG-INFO/scripts/arv-mount", line 185, in <module> llfuse.main() File "fuse_api.pxi", line 312, in llfuse.capi.main (src/llfuse/capi_linux.c:21095) File "handlers.pxi", line 406, in llfuse.capi.fuse_readdir (src/llfuse/capi_linux.c:10556) File "handlers.pxi", line 410, in llfuse.capi.fuse_readdir (src/llfuse/capi_linux.c:10448) UnicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 5: ordinal not in range(128)
Ideally, we have a working translation for any name that can possibly be in the database. But in cases (if any) where that's hard or impossible, we should do something like ignore/hide the affected objects or show them as if name were uuid, instead of crashing.
#8 Updated by Brett Smith almost 5 years ago
Peter Amstutz wrote:
After some research, it looks like we need to do .encode('utf-8') on the filename strings returned to llfuse.
We shouldn't assume that the client is using UTF-8. As discussed in the office, let's have arv-mount take this as an option, and suppress entries it can't encode. You might want to
pydoc str.encode to read about the errors argument to see your options for dealing with that.