We're Hiring!

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

General user discussion about using the OMERO platform to its fullest. Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

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

Postby Sethur » Fri Jan 29, 2016 11:35 am

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.
Sethur
 
Posts: 112
Joined: Thu Jan 16, 2014 11:34 pm

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

Postby cblackburn » Fri Jan 29, 2016 3:13 pm

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
cblackburn
 
Posts: 85
Joined: Mon May 25, 2009 9:03 pm

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

Postby Sethur » Wed Feb 03, 2016 4:42 pm

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.
Sethur
 
Posts: 112
Joined: Thu Jan 16, 2014 11:34 pm

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

Postby cblackburn » Wed Feb 03, 2016 5:08 pm

Hi Tristan,

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

Cheers,

Colin
cblackburn
 
Posts: 85
Joined: Mon May 25, 2009 9:03 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest