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

py2exe error

Hi

(complete newbie warning...:) )

I've written a script that uses pickle to store data to a file. here's the
code that stored the data:

-------------

def put(self, conf):
""" dump the preferences to a file"""

# TODO: make a backup copy of the prefs !!!!
try:
f = open(self.bacFile, "w")
except:
raise 'BadFileError', "couldn't write file"

pickle.dump(conf, f)
f.close()

---------------------------------

when running from regular python interperter, it works fine.

I need this script to run without python installed, so I've created a
stand-alone binary with py2exe. I used the following simple setup.py:

from distutils.core import setup
import py2exe

setup(name = 'default',
version = '0.1.0',
console = ["CLI_Backup.py"],
windows = ["Configurator.py"]
)
-------------------------

when running from this binary I get this error:
Traceback (most recent call last):
File "MainFrame.pyc", line 140, in OnSaveMenuEvent
File "MainFrame.pyc", line 174, in dumpPrefs
File "NS_Backup.pyc", line 64, in put
File "pickle.pyc", line 1382, in dump
File "pickle.pyc", line 231, in dump
File "pickle.pyc", line 293, in save
File "pickle.pyc", line 663, in save_dict
File "pickle.pyc", line 677, in _batch_setitems
File "pickle.pyc", line 293, in save
File "pickle.pyc", line 514, in save_unicode
LookupError: no codec search functions registered: can't find encoding
-----------------------------

I guess I should add some custom module to the setup.py but I don't know
which (or am I completely off track here...).

can someone help?

thanx
--
Haim

Jul 18 '05 #1
1 1563
>>>>> "Haim" == Haim Ashkenazi <ha**@babysnakes.org> writes:

Haim> Hi
Haim> (complete newbie warning...:) )

Python or internet newbie?

Google for 'py2exe "no codec search functions registered"'
and click on 'I feel lucky'.
Holger
Jul 18 '05 #2

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

Similar topics

0
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out...
2
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
2
by: Stefan Behrens | last post by:
Hi, does anybody know how I can get py2exe to work with wxPython's wxCalendarCtrl? Currently, I have just a "standard" setup.py, and py2exe gives me a syntax error. Do I need to include any...
0
by: Kathleen Kudzma | last post by:
I'm having a problem with py2exe for Python 2.3. I got fixed the Lookuperror no codec search functions registered: can't find encoding by following the instructions on the py2exe page (added...
2
by: Mike Zupan | last post by:
I had some problems with urllib and py2exe under pyton2.3. I works fine until i try to use the exe file. Here is the error Error: 1 LookupError Exception in Tk callback Function: <bound...
11
by: Grant Edwards | last post by:
I'm trying in vain to set the icon for the executable generated by py2exe. According to various sources there are two answers: 1) Do it on the command line: python setup.py py2exe --icon...
10
by: Justin Straube | last post by:
Hello, Im trying to compile a script with py2exe. The pickle module is causing the program to give an error. Traceback (most recent call last): File "SETIstat.pyw", line 330, in ? File...
4
by: bwaha | last post by:
First time trying to create an executable with py2exe. I have a small program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'), matplotlib ('0.83.2'), win32com (latest?), Numeric...
1
by: Dave Lim | last post by:
>On May 3, 1:29 pm, Dave Lim <diband... at yahoo.com> wrote: site:http://surguy.net/articles/speechrecognition.xml used out tried ? to protection aroundhttp://mail.yahoo.com I went and
4
by: vincehofmeister | last post by:
Hey everyone: I am using py2exe and everything is working fine except one module, ClientCookie, found here: http://wwwsearch.sourceforge.net/ClientCookie/ Keeps coming up as not found no...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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...

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.