salimoha / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

crash listing contacts #279

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

jpp@jpp-laptop:~$ google contacts list 
...
...
OK I replaced private information by dots
...
...
Traceback (most recent call last):
  File "/usr/bin/google", line 676, in <module>
    main()
  File "/usr/bin/google", line 662, in main
    run_once(options, args)
  File "/usr/bin/google", line 504, in run_once
    task.run(client, options, args)
  File "/usr/lib/pymodules/python2.6/googlecl/contacts/base.py", line 203, in _run_list
    delimiter=options.delimiter)
  File "/usr/lib/pymodules/python2.6/googlecl/base.py", line 603, in compile_entry_string
    return_string += val.replace(delimiter, ' ') + delimiter
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: 
ordinal not in range(128)

What version of the product are you using? 
the last one 9.10-1

On what operating system? 
ubuntu 10.04

What version of gdata-python-client
python-gdata                           1.2.4-0ubuntu2       

Original issue reported on code.google.com by jp.pr...@gmail.com on 7 Sep 2010 at 2:19

GoogleCodeExporter commented 9 years ago
I can't reproduce the error the way you've encountered it, but I think the 
attached patch will solve the problem. Let me know if you still see that 
exception after applying it. Thanks!

Original comment by tom.h.mi...@gmail.com on 7 Sep 2010 at 7:43

Attachments:

GoogleCodeExporter commented 9 years ago
Tom, your patch works for me.

Original comment by ferranb@gmail.com on 7 Sep 2010 at 10:34

GoogleCodeExporter commented 9 years ago
how to apply this patch ?

jpp@jpp-laptop:~/Téléchargements$ sudo patch < force_utf8_decode.patch 
[sudo] password for jpp: 
patching file base.py
Hunk #1 FAILED at 599.
Hunk #2 FAILED at 609.
2 out of 2 hunks FAILED -- saving rejects to file base.py.rej
patching file google
Hunk #1 FAILED at 487.
1 out of 1 hunk FAILED -- saving rejects to file google.rej

Original comment by jp.pr...@gmail.com on 8 Sep 2010 at 5:43

GoogleCodeExporter commented 9 years ago
There's a quick guide to applying patches in the FAQ: 
http://code.google.com/p/googlecl/wiki/FAQ

Original comment by tom.h.mi...@gmail.com on 8 Sep 2010 at 12:03

GoogleCodeExporter commented 9 years ago
This is definitely related to issue 195, which I've just re-opened.

Original comment by tom.h.mi...@gmail.com on 8 Sep 2010 at 1:20

GoogleCodeExporter commented 9 years ago
It's OK this patch. no more crash.
Thanks

Original comment by jp.pr...@gmail.com on 8 Sep 2010 at 6:35

GoogleCodeExporter commented 9 years ago
This patch fixed a similar issue for me on Mac OS X, but only after I have 
forced the terminal to use UTF-8 by setting LANG environment variable. Terminal 
does this by default, but iTerm not.

Original comment by tiago.cipriano on 22 Sep 2010 at 7:18