473,598 Members | 3,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encoding DeprecationWarn ing

Hey There,

Sorry if I am missing something here, but I get a DeprecationWarn ing
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 1433
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 DeprecationWarn ing
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_lis ts import all_countries
__console__:1: DeprecationWarn ing: 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...@obeatti e.com" <oli...@obeatti e.comwrote:
>from wt.lib.misc_lis ts import all_countries

__console__:1: DeprecationWarn ing: 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...@obeatti e.com" <oli...@obeatti e.comwrote:
>>from wt.lib.misc_lis ts import all_countries
__console__:1: DeprecationWarn ing: 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
6549
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; see http://www.python.org/peps/pep-0263.html for details And while I understand the problem, I cannot fathom why Python
6
3815
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: DeprecationWarning: the FCNTL module is Deprecated; please use fcntl DeprecationWarning).
0
1510
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 not use it What should the library be using instead of SmartCookie?
77
5244
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 $ python2.3 -Wall -c "print 0 <> 0" False
8
2806
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 object, it is encoded in utf-8 automatically. It can be a problem when I'm building an interactive environment using "compile", with a different encoding from utf-8. IDLE itself has the same problem. ( '<a string with non-ascii-encoding>' is...
0
1959
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 tag = node.tag if tag is Comment: file.write("<!-- %s -->" % _escape_cdata(node.text, encoding)) elif tag is ProcessingInstruction: file.write("<?%s?>" % _escape_cdata(node.text, encoding))
5
1766
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 fl=range(1000*(math.floor(25000*f2m/1000)),46000*f2m,1000) As I don't know python, I tried sticking an int( ) in various places in that line but couldn't get whatever is bothering python to shut up. Help. (That long-gone guy is actually me, according to the notes...
7
7480
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 disappear from the output of a CGI program. John Nagle
1
32880
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); ###Question: Now this creates finalfile.txt with ANSI Encoding ...which is a default. Either tell me how to change the default or how to create a
0
7991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7902
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8050
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8265
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6719
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5850
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3898
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
1250
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.