Codec Search Function

J

James Stroud

Hello All,

I'm using pyinstaller 1.0 (stable) on win32xp and it is not able to find
the codec for several encodings (hex, base64, etc.). I resorted to
writing my own for hex, just to see if I could get my program deployed.
But I think a more permanent solution would be to get pyinstaller
working right.

I tried the latest release (unstable version), claiming that it solved
the problem, but it had problems finding a search function:

LookupError: no codec search functions registered: can't find encoding

I looked at the documentation for codecs.register, and it was really not
clear exactly how I was to create the search function that needs
registering. Any help would be appreciated.

James
 
J

James Stroud

James said:
Hello All,

I'm using pyinstaller 1.0 (stable) on win32xp and it is not able to find
the codec for several encodings (hex, base64, etc.). I resorted to
writing my own for hex, just to see if I could get my program deployed.
But I think a more permanent solution would be to get pyinstaller
working right.

I tried the latest release (unstable version), claiming that it solved
the problem, but it had problems finding a search function:

LookupError: no codec search functions registered: can't find encoding

I looked at the documentation for codecs.register, and it was really not
clear exactly how I was to create the search function that needs
registering. Any help would be appreciated.

James

I was able to get all the functionality I needed from binascii.

James
 
G

Giovanni Bajo

James said:
I'm using pyinstaller 1.0 (stable) on win32xp and it is not able to
find the codec for several encodings (hex, base64, etc.). I resorted
to writing my own for hex, just to see if I could get my program
deployed. But I think a more permanent solution would be to get
pyinstaller working right.

I tried the latest release (unstable version), claiming that it solved
the problem, but it had problems finding a search function:

LookupError: no codec search functions registered: can't find encoding

I looked at the documentation for codecs.register, and it was really
not clear exactly how I was to create the search function that needs
registering. Any help would be appreciated.


Do you have a small reproducible sample which shows the problem? With
PyInstaller SVN version, the problem appeared to be fixed for the testcases I
had.

BTW: putting "PyInstaller" in the subject of the mail for PyInstaller-related
mails (and/or mailing to the PyInstaller mailing list) would be preferred to
get a quicker answer.

Thanks!
 
J

James Stroud

Giovanni said:
James Stroud wrote:





Do you have a small reproducible sample which shows the problem? With
PyInstaller SVN version, the problem appeared to be fixed for the testcases I
had.

BTW: putting "PyInstaller" in the subject of the mail for PyInstaller-related
mails (and/or mailing to the PyInstaller mailing list) would be preferred to
get a quicker answer.

Thanks!

How do I get the SVN version? Maybe that is not the one I have. This
crashes on the version I have (complete program listing):

"abcde".encode('hex')

LookupError: no codec search functions registered: can't find encoding

I am using the latest enthought python and the latest snapshot of
pyinstaller.

James
 
F

Fredrik Lundh

James said:
How do I get the SVN version? Maybe that is not the one I have. This
crashes on the version I have (complete program listing):

"abcde".encode('hex')

LookupError: no codec search functions registered: can't find encoding
I am using the latest enthought python and the latest snapshot of
pyinstaller.

looks like pyinstaller isn't clever enough to bundle the relevant encodings
by default. see

http://starship.python.net/crew/theller/moin.cgi/EncodingsAgain

for workarounds for py2exe.

</F>
 
G

Giovanni Bajo

James said:
How do I get the SVN version? Maybe that is not the one I have.

svn export svn://pyinstaller.hpcf.upr.edu/trunk pyinstaller
This
crashes on the version I have (complete program listing):

"abcde".encode('hex')

LookupError: no codec search functions registered: can't find encoding


I tried it and it works for me with a default spec file. Try again with latest
PyInstaller from SVN, or otherwise please enter the "buildXXXXX" directory made
by PyInstaller through the build process, and execute "ArchiveViewer.py
out1.pyz" (ArchiveViewer.py is shipped with Python). It will display a list of
all the packaged modules: in my list, 'encodings.hex_codec' appears.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top