473,414 Members | 1,575 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,414 software developers and data experts.

utf encoding error

hi there, this one is in relation to my py2exe saga.

when i compile a package using py2exe i get the error msg below, if i
just run the py files it doesn't error, so i assume pysvn is trying to
use something thats not being included in the build. only i have no idea
where to start looking.

Traceback (most recent call last):
File "Main.pyc", line 819, in ValidateLogin
File "Main.pyc", line 861, in ShowMainFrameItems
LookupError: unknown encoding: utf-8
and here is my setup.py for py2exe for good measure

from distutils.core import setup
import py2exe

package_dir = ['c:\python23\reportlab', 'c:\python23\lib',
'Z:\Projects\PubWare\trunk\python']

setup(windows=[ "Z:\\Projects\\PubWare\\trunk\\python\\PubWare .py"])
Jul 19 '05 #1
1 2616
Timothy Smith wrote:
hi there, this one is in relation to my py2exe saga.

when i compile a package using py2exe i get the error msg below, if i
just run the py files it doesn't error, so i assume pysvn is trying to
use something thats not being included in the build. only i have no idea
where to start looking.

Traceback (most recent call last):
File "Main.pyc", line 819, in ValidateLogin
File "Main.pyc", line 861, in ShowMainFrameItems
LookupError: unknown encoding: utf-8
and here is my setup.py for py2exe for good measure

from distutils.core import setup
import py2exe
package_dir = ['c:\python23\reportlab', 'c:\python23\lib',
'Z:\Projects\PubWare\trunk\python']
setup(windows=[
"Z:\\Projects\\PubWare\\trunk\\python\\PubWare .py"])

Py2exe has a Wiki which answers a lot of these questions. In general,
you might find it useful to look there.

For your problem: you need to explicitly include the encodings module
for utf8. Using static analysis Py2exe can't known to include it in the
built exe. Something like this should work for you ...

# setup.py

from distutils.core import setup
import py2exe

explicitIncludes = [
"encodings.utf_8",

]

opts = {
"py2exe": {
"includes": explicitIncludes,
# "optimize" : 2
}
}

setup(
windows = ["XXXXXX.py"],
options=opts,
)
Jul 19 '05 #2

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

Similar topics

2
by: Ann | last post by:
Hi, Is there any way to Change encoding of Java Vm to ISO-8859-1? i am using Java vm along with an application called opencms. I get the following error message.. Error: the encoding of your...
14
by: Sebastian Meyer | last post by:
Hi newsgroup, i am trying to replace german special characters in strings like str = re.sub('ö', 'oe', str) When i work with this, i always get the message UniCode Error: ASCII decoding error...
1
by: Matt | last post by:
It has no error if I use <?xml version="1.0" encoding="utf-8" ?> in XML declaration. But if I use <?xml version="1.0" encoding="ISO-8859-1"?> It will produce error: The XML page cannot be...
48
by: Zenobia | last post by:
Recently I was editing a document in GoLive 6. I like GoLive because it has some nice features such as: * rewrite source code * check syntax * global search & replace (through several files at...
4
by: xmlguy | last post by:
XmlTextReader myXmlReader = new XmlTextReader(args); string en = myXmlReader.Encoding.EncodingName; //Console.WriteLine(x); Error: Unhandled Exception: System.NullReferenceException: Object...
6
by: jmgonet | last post by:
Hello everybody, I'm having troubles loading a Xml string encoded in UTF-8. If I try this code: ------------------------------ XmlDocument doc=new XmlDocument(); String s="<?xml...
8
by: Xarky | last post by:
Hi, I am downloading a GIF file(as a mail attachement) with this file format, Content-Transfer-Encoding: base64; Now I am writing the downloaded data to a file with this technique: ...
6
by: Danny | last post by:
I am working on a project in which a number of client applications will be posting xml documents as a byte array to an ASP.NET page on our web server. I am trying to simulate the process and run...
6
by: kath | last post by:
Hi all, Platform: winxp Version: Python 2.3 I have a task of reading files in a folder and creating an one excel file with sheets, one sheet per file, with sheet named...
2
by: =?Utf-8?B?bW9pdGFs?= | last post by:
I have a client application ( web service ) write in vs2005 consuming an external web service with WSE 2.0 (x509). The response is in hebrew ( windows-1255 ). In the Trace files I see the hebrew...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.