473,396 Members | 1,914 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 and urllib(2) errors

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 method MainWindow.selectDir of <__main__.MainWindow
instance
at 0x00DF4058>> (type: <type 'instancemethod'>)
Args: ()
Traceback (innermost last):
File "Pmw.pyc", line 1784, in __call__
None
File "<string>", line 270, in selectDir
None
File "<string>", line 361, in grabAlbumDirs
None
File "<string>", line 431, in addAlbumData
None
File "<string>", line 469, in grabImage
None
File "urllib2.pyc", line 129, in urlopen
None
File "urllib2.pyc", line 326, in open
None
File "urllib2.pyc", line 306, in _call_chain
None
File "urllib2.pyc", line 901, in http_open
None
File "urllib2.pyc", line 884, in do_open
None
File "httplib.pyc", line 712, in endheaders
None
File "httplib.pyc", line 597, in _send_output
None
File "httplib.pyc", line 564, in send
None
File "httplib.pyc", line 532, in connect
None
LookupError: no codec search functions registered: can't find encoding
Here is the section of code that produces the error

urllib.urlretrieve(imageURL, saveFile)

imageURL and saveFile are correct
Here is my setup.py file

# setup.py
from distutils.core import setup

import py2exe

setup(
scripts=["art.py"]
)
and here is my batch file

c:\python23\python setup.py py2exe -pPIL --packages=encodings
Thanks
Mike

Jul 18 '05 #1
2 2625
(From the py2exe homepage:
http://starship.python.net/crew/theller/py2exe/)
...if your exe-file reports errors like LookupError: no codec search
functions registered: can't find encoding or LookupError: unknown encoding,
you should advise py2exe to include this package with the '--packages
encodings' command line option.

Google turns up information very quickly.

Larry Bates
"Mike Zupan" <mi**@zcentric.com> wrote in message
news:ma**********************************@python.o rg...
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 method MainWindow.selectDir of <__main__.MainWindow
instance
at 0x00DF4058>> (type: <type 'instancemethod'>)
Args: ()
Traceback (innermost last):
File "Pmw.pyc", line 1784, in __call__
None
File "<string>", line 270, in selectDir
None
File "<string>", line 361, in grabAlbumDirs
None
File "<string>", line 431, in addAlbumData
None
File "<string>", line 469, in grabImage
None
File "urllib2.pyc", line 129, in urlopen
None
File "urllib2.pyc", line 326, in open
None
File "urllib2.pyc", line 306, in _call_chain
None
File "urllib2.pyc", line 901, in http_open
None
File "urllib2.pyc", line 884, in do_open
None
File "httplib.pyc", line 712, in endheaders
None
File "httplib.pyc", line 597, in _send_output
None
File "httplib.pyc", line 564, in send
None
File "httplib.pyc", line 532, in connect
None
LookupError: no codec search functions registered: can't find encoding
Here is the section of code that produces the error

urllib.urlretrieve(imageURL, saveFile)

imageURL and saveFile are correct
Here is my setup.py file

# setup.py
from distutils.core import setup

import py2exe

setup(
scripts=["art.py"]
)
and here is my batch file

c:\python23\python setup.py py2exe -pPIL --packages=encodings
Thanks
Mike


Jul 18 '05 #2
this was my command line

c:\python23\python setup.py py2exe -pPIL --packages=encodings

it was using py2exe 4.2. I also tried with no = to get the same results

Mike
(From the py2exe homepage:
http://starship.python.net/crew/theller/py2exe/)
..if your exe-file reports errors like LookupError: no codec search
functions registered: can't find encoding or LookupError: unknown
encoding, you should advise py2exe to include this package with the
'--packages encodings' command line option.

Google turns up information very quickly.

Larry Bates
"Mike Zupan" <mi**@zcentric.com> wrote in message
news:ma**********************************@python.o rg...
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 method MainWindow.selectDir of <__main__.MainWindow
instance
at 0x00DF4058>> (type: <type 'instancemethod'>)
Args: ()
Traceback (innermost last):
File "Pmw.pyc", line 1784, in __call__
None
File "<string>", line 270, in selectDir
None
File "<string>", line 361, in grabAlbumDirs
None
File "<string>", line 431, in addAlbumData
None
File "<string>", line 469, in grabImage
None
File "urllib2.pyc", line 129, in urlopen
None
File "urllib2.pyc", line 326, in open
None
File "urllib2.pyc", line 306, in _call_chain
None
File "urllib2.pyc", line 901, in http_open
None
File "urllib2.pyc", line 884, in do_open
None
File "httplib.pyc", line 712, in endheaders
None
File "httplib.pyc", line 597, in _send_output
None
File "httplib.pyc", line 564, in send
None
File "httplib.pyc", line 532, in connect
None
LookupError: no codec search functions registered: can't find encoding
Here is the section of code that produces the error

urllib.urlretrieve(imageURL, saveFile)

imageURL and saveFile are correct
Here is my setup.py file

# setup.py
from distutils.core import setup

import py2exe

setup(
scripts=["art.py"]
)
and here is my batch file

c:\python23\python setup.py py2exe -pPIL --packages=encodings
Thanks
Mike


--
http://mail.python.org/mailman/listinfo/python-list



Jul 18 '05 #3

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...
1
by: Funduk | last post by:
Hello, So I've been playing with Python and Pygame for a while and I decided I wanted to make a real executable so I could send that stuff over to my friends to show off my <sarcasm>maad...
5
by: Lad | last post by:
I try to make an exe file from my script with help of Py2exe but I am not successfull. I have my script start.py that has only one command ############### import rgs.py ############## ...
6
by: justsee | last post by:
Hi, I'm using Python 2.3 on Windows for the first time, and am doing something wrong in using urllib to retrieve images from urls embedded in a csv file. If I explicitly specify a url and image...
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: 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
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
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:
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...
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...

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.