sitron / lst

3 stars 3 forks source link

Error on get-user-id for user with special characters in name #32

Closed francoisbruneau closed 10 years ago

francoisbruneau commented 10 years ago
MacBook-Air-de-Francois:~ paco$ lst get-user-id bruneau
Reading config
Traceback (most recent call last):
  File "/usr/local/bin/lst", line 4, in <module>
    app.main()
  File "/usr/local/lib/python2.7/site-packages/lst/app.py", line 109, in main
    app.run()
  File "/usr/local/lib/python2.7/site-packages/lst/app.py", line 102, in run
    action.run(args)
  File "/usr/local/lib/python2.7/site-packages/lst/commands/retrieve_user_id.py", line 30, in run
    self._output(users, names)
  File "/usr/local/lib/python2.7/site-packages/lst/commands/retrieve_user_id.py", line 41, in _output
    user['id']
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in position 4: ordinal not in range(128)

MacBook-Air-de-Francois:~ paco$ lst get-user-id lanz
Reading config
found Lanz (Daniel) with id 217

My username is Zebra is "François Bruneau", I'm pretty sure the "ç" breaks it.

sitron commented 10 years ago

Thanks for reporting, i ll fix it asap On Feb 6, 2014 8:43 AM, "François Bruneau" notifications@github.com wrote:

MacBook-Air-de-Francois:~ paco$ lst get-user-id bruneau Reading config Traceback (most recent call last): File "/usr/local/bin/lst", line 4, in app.main() File "/usr/local/lib/python2.7/site-packages/lst/app.py", line 109, in main app.run() File "/usr/local/lib/python2.7/site-packages/lst/app.py", line 102, in run action.run(args) File "/usr/local/lib/python2.7/site-packages/lst/commands/retrieve_user_id.py", line 30, in run self._output(users, names) File "/usr/local/lib/python2.7/site-packages/lst/commands/retrieve_user_id.py", line 41, in _output user['id'] UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in position 4: ordinal not in range(128)

MacBook-Air-de-Francois:~ paco$ lst get-user-id lanz Reading config found Lanz (Daniel) with id 217

My username is Zebra is "François Bruneau", I'm pretty sure the "ç" breaks it.

— Reply to this email directly or view it on GitHubhttps://github.com/sitron/lst/issues/32 .

sitron commented 10 years ago

should be fixed now @francoisbruneau can you please try? sudo pip install git+git://github.com/sitron/lst@master --upgrade

francoisbruneau commented 10 years ago

Still does not work after upgrade. Did you test with "lst get-user-id bruneau"? Cheers!

sitron commented 10 years ago

this time should really be ok :) can you try again?

francoisbruneau commented 10 years ago

Woohoo! Works :) Merci beaucoup!