Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #12370 (closed)

Opened 10 years ago

Closed 10 years ago

BUG: omero user list doesn't handle non-ascii chars

Reported by: spli Owned by: sbesson
Priority: major Milestone: 5.0.3
Component: OmeroPy Version: 5.0.2
Keywords: n.a. Cc: python-team@…, nikolaus.ehrenfeuchter@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description (last modified by spli)

Orignally reported in http://www.openmicroscopy.org/community/viewtopic.php?f=5&t=7538

Create a user with a non-ascii character in the first name, last name or username.

omero user list fails

omero@5ead5bfc7cae:~$ OMERO.server/bin/omero user add x y £ user
Using session 2f645c98-09db-436f-b231-7a30db7ab8ad (root@localhost:4064). Idle timeout: 10.0 min. Current group: system
Please enter password for your new user (x):
Please re-enter password for your new user (x):
Added user x (id=35) with password

omero@5ead5bfc7cae:~$ OMERO.server/bin/omero user list
Using session 2f645c98-09db-436f-b231-7a30db7ab8ad (root@localhost:4064). Idle timeout: 10.0 min. Current group: system
Traceback (most recent call last):  File "OMERO.server/bin/omero", line 125, in <module>
    rv = omero.cli.argv()
  File "/home/omero/OMERO.server/lib/python/omero/cli.py", line 1242, in argv
    cli.invoke(args[1:])
  File "/home/omero/OMERO.server/lib/python/omero/cli.py", line 791, in invoke
    stop = self.onecmd(line, previous_args)
  File "/home/omero/OMERO.server/lib/python/omero/cli.py", line 860, in onecmd
    self.execute(line, previous_args)
  File "/home/omero/OMERO.server/lib/python/omero/cli.py", line 940, in execute
    args.func(args)
  File "/home/omero/OMERO.server/lib/python/omero/plugins/user.py", line 293, in list
    self.ctx.out(str(tb.build()))
  File "/home/omero/OMERO.server/lib/python/omero/util/text.py", line 245, in __str__
    return '\n'.join(self.get_rows())
  File "/home/omero/OMERO.server/lib/python/omero/util/text.py", line 241, in get_rows
    for row in self.style.get_rows(self):
  File "/home/omero/OMERO.server/lib/python/omero/util/text.py", line 54, in get_rows
    yield self.SEPARATOR.join(table.get_row(i))
  File "/home/omero/OMERO.server/lib/python/omero/util/text.py", line 232, in get_row
    x[i].decode("ascii")
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 0: ordinal not in range(128)
omero@5ead5bfc7cae:~$

Change History (4)

comment:1 Changed 10 years ago by spli

  • Cc nikolaus.ehrenfeuchter@… added
  • Description modified (diff)

comment:2 Changed 10 years ago by jamoore

  • Owner changed from python-team@… to sbesson
  • Priority changed from minor to major

I'll leave sbesson to move this to the proper milestone; I know he's already begun looking into this issue. If it can be in 5.0.3 then +1.

comment:3 Changed 10 years ago by sbesson

  • Milestone changed from Unscheduled to 5.0.3
  • Status changed from new to accepted

comment:4 Changed 10 years ago by sbesson

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.65381 sec.)

We're Hiring!