Task #5404 (closed)
Opened 8 years ago
Closed 8 years ago
Bug: webmobile raises "ordinal not in range" on unicode
| Reported by: | jamoore | Owned by: | wmoore |
|---|---|---|---|
| Priority: | major | Milestone: | OMERO-Beta4.3 |
| Component: | Web | Version: | n.a. |
| Keywords: | n.a. | Cc: | cneves, atarkowska |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | 0.0d |
| Sprint: | n.a. |
Description
Traceback (most recent call last):
File "/home/omero/OMERO.server-4.3.0-DEV-8b719fb2/lib/python/django/core/handlers/base.py", line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/omero/OMERO.server-4.3.0-DEV-8b719fb2/lib/python/omeroweb/webmobile/views.py", line 48, in wrapped
return f(request, *args, **kwargs)
File "/home/omero/OMERO.server-4.3.0-DEV-8b719fb2/lib/python/omeroweb/webmobile/views.py", line 466, in add_comment
ann.setTextValue(rstring(str( comment.strip() ) ))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 11: ordinal not in range(128)
<WSGIRequest
GET:<QueryDict: {}>,
POST:<QueryDict: {u'comment': [u'Freude, sch\xf6ne G\xf6tterfunken, Tochter aus Elysium. Tsch\xfc\xdf. ("\xf8\u03a9\u2248\xe7")']}>,
COOKIES:{'sessionid': 'bb2c8fb7ce7ee528dd0c9f35186277d2'},
META:{'CONTENT_LENGTH': '129',
'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'DOCUMENT_ROOT': '/var/www',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'sessionid=bb2c8fb7ce7ee528dd0c9f35186277d2',
'HTTP_HOST': 'gretzky.openmicroscopy.org.uk',
'HTTP_KEEP_ALIVE': '115',
'HTTP_REFERER': 'http://gretzky.openmicroscopy.org.uk/m/image/11451/',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1',
'PATH': '/usr/local/bin:/usr/bin:/bin',
'PATH_INFO': u'/m/add_comment/image/11451/',
'PATH_TRANSLATED': '/var/www/omero.fcgi/m/add_comment/image/11451/',
'QUERY_STRING': '',
'REMOTE_ADDR': '89.15.58.121',
'REMOTE_PORT': '51405',
'REQUEST_METHOD': 'POST',
'REQUEST_URI': '/m/add_comment/image/11451/',
'SCRIPT_FILENAME': '/var/www/omero.fcgi',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '134.36.65.227',
'SERVER_ADMIN': 'webmaster@localhost',
'SERVER_NAME': 'gretzky.openmicroscopy.org.uk',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': '<address>Apache/2.2.14 (Ubuntu) Server at gretzky.openmicroscopy.org.uk Port 80</address>\n',
'SERVER_SOFTWARE': 'Apache/2.2.14 (Ubuntu)',
'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x3f9fe90>,
'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x40d4b10>,
'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>
Change History (2)
comment:1 Changed 8 years ago by wmoore
comment:2 Changed 8 years ago by Will Moore <will@…>
- Remaining Time set to 0
- Resolution set to fixed
- Status changed from new to closed
(In [39a0e7629f871b26bbda6aeeaa48f30a99fb04fa/ome.git] on branch develop) Webmobile comments handle non-utf-8 characters. Closes #5404
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.
To fix this problem in web generally: #5407.