473,382 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Encoding DeprecationWarning

Hey There,

Sorry if I am missing something here, but I get a DeprecationWarning
when importing a list which has some unicode characters in it (it's a
list of countries -- it's being raised on Åland), and I am left
wondering why. I am using the syntax u' to denote a unicode string.

If anyone would be so kind; what am I doing wrong?

Many Thanks,
Oliver

Aug 4 '07 #1
4 1420
On Sat, 2007-08-04 at 12:07 -0700, ol****@obeattie.com wrote:
Hey There,

Sorry if I am missing something here, but I get a DeprecationWarning
when importing a list which has some unicode characters in it
Please copy and paste the full text of the warning.

--
Carsten Haese
http://informixdb.sourceforge.net
Aug 4 '07 #2
>>from wt.lib.misc_lists import all_countries
__console__:1: DeprecationWarning: Non-ASCII character '\xc3' in file /
Django/wt/../wt/lib/misc_lists.py on line 141, but no encoding
declared; see http://www.python.org/peps/pep-0263.html for details

Aug 4 '07 #3
On Aug 4, 11:43 pm, "oli...@obeattie.com" <oli...@obeattie.comwrote:
>from wt.lib.misc_lists import all_countries

__console__:1: DeprecationWarning: Non-ASCII character '\xc3' in file /
Django/wt/../wt/lib/misc_lists.py on line 141, but no encoding
declared; seehttp://www.python.org/peps/pep-0263.htmlfor details
OK, well; no matter. Perhaps I should try actually reading the article
it recommended and add:

# -*- coding: utf-8 -*-

To the file! What a doofus!

Thanks,
Oliver

Aug 4 '07 #4
On Sat, 2007-08-04 at 15:52 -0700, ol****@obeattie.com wrote:
On Aug 4, 11:43 pm, "oli...@obeattie.com" <oli...@obeattie.comwrote:
>>from wt.lib.misc_lists import all_countries
__console__:1: DeprecationWarning: Non-ASCII character '\xc3' in file /
Django/wt/../wt/lib/misc_lists.py on line 141, but no encoding
declared; seehttp://www.python.org/peps/pep-0263.htmlfor details

OK, well; no matter. Perhaps I should try actually reading the article
it recommended
Right, that's why I asked you to post the full warning message, to get
you to take another look at it. Mission accomplished ;)

--
Carsten Haese
http://informixdb.sourceforge.net
Aug 4 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Klaus Alexander Seistrup | last post by:
Hi, After upgrading my Python interpreter to 2.3.1 I constantly get warnings like this: DeprecationWarning: Non-ASCII character '\xe6' in file mumble.py on line 2, but no encoding declared;...
6
by: Pierre Rouleau | last post by:
Hi all! I am using Python 2.3.1 on Win32 (NT, 2000). Whenever a file imports the standard tempfile module, Python 2.3.1 issues the following warning: C:\Python23\lib\fcntl.py:7:...
0
by: Ben Finney | last post by:
Howdy all, I'm using a library that uses SmartCookie. In Python 2.3, that gives this warning: /usr/lib/python2.3/Cookie.py:712: DeprecationWarning: Cookie/SmartCookie class is insecure; do...
77
by: Gerrit Holl | last post by:
Hi, the <> inequality test operator has been deprecated for a loooooong time. Is there a reason that it doesn't trigger a DeprecationWarning? $ python2.2 -Wall -c "print 0 <> 0" 0 $...
8
by: janeaustine50 | last post by:
Python's InteractiveInterpreter uses the built-in compile function. According to the ref. manual, it doesn't seem to concern about the encoding of the source string. When I hand in an unicode...
0
by: Chris McDonough | last post by:
ElementTree's XML serialization routine implied by tree._write(file, node, encoding, namespaces looks like this (elided): def _write(self, file, node, encoding, namespaces): # write XML to file...
5
by: Dan Jacobson | last post by:
Here's the deal: I have to maintain this long gone guy's programs and lately they've been saying ../north_pass.py:14: DeprecationWarning: integer argument expected, got float...
7
by: John Nagle | last post by:
How do I suppress "DeprecationWarning: Old style callback, use cb_func(ok, store) instead". A library is triggering this message, the library is being fixed, but I need to make the message...
1
by: ujjwaltrivedi | last post by:
Hey guys, Can anyone tell me how to create a text file with Unicode Encoding. In am using FileStream Finalfile = new FileStream("finalfile.txt", FileMode.Append, FileAccess.Write); ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.