Page 1 of 1

OMERO.DropBox crashes when using UTF8-chars in file names

PostPosted: Fri Jan 29, 2016 11:35 am
by Sethur
Hi,

the Dropbox seems to have the infamous UTF8 problems again. If users try to upload files with German special characters in them (UTF8 encoded), like äöüÄÖÜß, the upload fails. Previously, this was already fixed, at least for file names (not for folder names, though).

This is the MonitorServer.log of a failed attempt:

Code: Select all
b4-11e5-9403-001e6752dcf8 failed. Reason: exception ::omero::InternalException
{
    serverStackTrace = Traceback (most recent call last):
  File "/usr/local/share/omero/OMERO.server-5.2.1-ice35-b15/lib/python/omero/util/decorators.py", line 68, in exc_handler
    rv = func(*args, **kwargs)
  File "/usr/local/share/omero/OMERO.server-5.2.1-ice35-b15/lib/python/omero/util/decorators.py", line 28, in handler
    return func(*args, **kwargs)
  File "/usr/local/share/omero/OMERO.server-5.2.1-ice35-b15/lib/python/fsDropBoxMonitorClient.py", line 476, in fsEventHappened
    exName = self.getExperimenterFromPath(fileId)
  File "/usr/local/share/omero/OMERO.server-5.2.1-ice35-b15/lib/python/fsDropBoxMonitorClient.py", line 528, in getExperimenterFromPath
    fileId = pathModule.path(fileId)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 65: ordinal not in range(128)

    serverExceptionClass =
    message = Internal exception
}


Here, the problematic file name contained the character 'ß'.

This has already been identified as an issue in the respective python code, but apparently, it hasn't been fixed, yet. Is there a workaround?

Cheers,

Tristan

PS: The problematic file was the only one in a folder, but it lead to all the other files that contained no problematic characters also not being uploaded.

Re: OMERO.DropBox crashes when using UTF8-chars in file name

PostPosted: Fri Jan 29, 2016 3:13 pm
by cblackburn
Hi Tristan,

Sethur wrote:Hi,

the Dropbox seems to have the infamous UTF8 problems again. If users try to upload files with German special characters in them (UTF8 encoded), like äöüÄÖÜß, the upload fails. Previously, this was already fixed, at least for file names (not for folder names, though).



Looking back at:

viewtopic.php?f=4&t=7810#p15910

the fix was a local customisation. Can you let us know if this modification is in place for your current server instance?

Cheers,

Colin

Re: OMERO.DropBox crashes when using UTF8-chars in file name

PostPosted: Wed Feb 03, 2016 4:42 pm
by Sethur
Hi Colin,

thanks for your reply. You are right, I forgot about this modification. I added an appropriate sitecustomize.py to $OMERO_PREFIX/lib/python and added this path to $PYTHONPATH for the omero user.

Running
Code: Select all
python -c "import sys; print sys.getdefaultencoding()"

as the omero user will give me "utf-8" now.

I'll check if this fixes things.

Best,

Tristan

UPDATE: Doing what I described above fixed the problems, both with directory names and with file names.

Re: OMERO.DropBox crashes when using UTF8-chars in file name

PostPosted: Wed Feb 03, 2016 5:08 pm
by cblackburn
Hi Tristan,

Thanks for letting us know and I'm glad this fix works okay.

Cheers,

Colin