Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 54:

2016-04-24 Thread Peter Otten
__ > self.fields[field_name] = self.get_pynagField(field_name, > css_tag="inherited") File "/opt/adagios/adagios/objectbrowser/forms.py", > line 418, in get_pynagField _('%(inherited_value)s (inherited from > template)') % {'inherited_value':

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 54:

2016-04-24 Thread arthur sherman
t;/opt/adagios/adagios/objectbrowser/forms.py", line 418, in get_pynagField _('%(inherited_value)s (inherited from template)') % {'inherited_value': smart_str(inherited_value)} UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 54: ordinal not

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

2013-11-27 Thread Terry Reedy
On 11/27/2013 7:37 AM, Tim Golden wrote: On 27/11/2013 08:31, Hoàng Tuấn Việt wrote: I cannot see your reply in python-list until I search this question on Internet again. (cc-ing the OP because of the nature of the problem) Viet, That's because you're not subscribed to the list. The way it

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

2013-11-27 Thread Tim Golden
On 27/11/2013 08:31, Hoàng Tuấn Việt wrote: > I cannot see your reply in python-list until I search this question > on Internet again. (cc-ing the OP because of the nature of the problem) Viet, That's because you're not subscribed to the list. The way it works is that you subscribe to the list a

RE: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

2013-11-27 Thread Hoàng Tuấn Việt
Hi Fabio, I cannot see your reply in python-list until I search this question on Internet again. I try (username.encode('utf-8') + '\r') and the problem is fixed. Thank you very much. Viet >You should be able to reproduce the same behavior on PyDev if in your run >configuratio

Re: [2.5.1] "UnicodeDecodeError: 'ascii' codec can't decode byte"?

2008-10-29 Thread Steve Holden
Ulrich Eckhardt wrote: > Gilles Ganault wrote: >> I'm getting this error while downloading and parsing web pages: >> >> = >> title = m.group(1) >> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position >> 48: ordin

Re: [2.5.1] "UnicodeDecodeError: 'ascii' codec can't decode byte"?

2008-10-29 Thread Ulrich Eckhardt
Gilles Ganault wrote: > I'm getting this error while downloading and parsing web pages: > > = > title = m.group(1) > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position > 48: ordinal not in range(128) > = > > From w

[2.5.1] "UnicodeDecodeError: 'ascii' codec can't decode byte"?

2008-10-29 Thread Gilles Ganault
Hello I'm getting this error while downloading and parsing web pages: = title = m.group(1) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 48: ordinal not in range(128) = >From what I understand, it's because some strings ar

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in

2008-10-21 Thread Gabriel Genellina
En Thu, 16 Oct 2008 00:16:13 -0300, MOS37F MOS37F <[EMAIL PROTECTED]> escribió: import shelve from ShelfFile import ABC from zipfile import ZipFile, ZIP_DEFLATED ShelfFilePath = 'E:\DIR\DIR\DIR\ShelfFile' If you want some kind of answer: - shorten the code to the minimum fragment that stil

UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in

2008-10-15 Thread MOS37F MOS37F
se() print '\tComplete:', FilePath2 #### Debug I/O: #Yes, just as expected UV.DirectoryPath1 == E:\TestDir\TestDir: Exceptions: #Not as expected UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 10: ordinal

Re: UnicodeDecodeError: 'ascii' codec can't decode byte

2008-06-17 Thread Gilles Ganault
On Tue, 17 Jun 2008 09:23:28 +0200, Peter Otten <[EMAIL PROTECTED]> wrote: > Assuming that encoding is UTF-8 and that apsw can cope > with unicode, try to convert your data to unicode before > feeding it to the database api: > >> sql = "INSERT INTO mytable (col1,col2) VALUES (?,?)" > > rows = ([co

Re: UnicodeDecodeError: 'ascii' codec can't decode byte

2008-06-17 Thread Peter Otten
Gilles Ganault wrote: > It seems like I have Unicode data in a CSV file but Python is using > a different code page, so isn't happy when I'm trying to read and put > this data into an SQLite database with APSW: My guess is that you have non-ascii characters in a bytestring. > What should I do s

UnicodeDecodeError: 'ascii' codec can't decode byte

2008-06-16 Thread Gilles Ganault
utemany(sql, records("test.tsv")) """ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc9 in position 18: ordinal not in range(128) """ What should I do so Python doesn't raise this error? Should I convert data in the CVS file,