A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/116708.html below:

UnicodeError

UnicodeError UnicodeErrorKristian Ovaska kristian.ovaska at helsinki.fi
Mon Apr 30 10:58:08 EDT 2001
Oliver Vecernik <vecernik at aon.at>:
>    df.write('DROP TABLE %s;\n' % daoDB.TableDefs(t).Name)
>UnicodeError: ASCII encoding error: ordinal not in range(128)

Try daoDB.TableDefs(t).Name.encode('ISO-8859-1') if you use Python 2.
(If Name is not a string, convert it to string first.) I had similar
problems with XML files that have non-ASCII content and this solved
some of them. I still haven't sorted everything out, though.

-- 
Kristian Ovaska <kristian.ovaska at helsinki.fi>

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4