473,511 Members | 15,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Codec Search Function

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
Jan 25 '06 #1
5 5328
James Stroud wrote:
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
Jan 25 '06 #2
James Stroud wrote:
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!
--
Giovanni Bajo
Jan 26 '06 #3
Giovanni Bajo wrote:
James Stroud wrote:

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!


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
Jan 27 '06 #4
James Stroud wrote:
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/thel...EncodingsAgain

for workarounds for py2exe.

</F>

Jan 27 '06 #5
James Stroud wrote:
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.
--
Giovanni Bajo
Jan 28 '06 #6

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

Similar topics

1
3160
by: Mark Hahn | last post by:
I'm using the MIMEText module as part of sending email with no problem until I put it through py2exe. Then I get this error: LookupError: unknown encoding: ascii .... on this line ... File...
5
4549
by: Fuzzyman | last post by:
Sorry if my terminology is wrong..... but I'm having intermittent problems dealing with accented characters in python. (Only from the 8 bit latin-1 character set I think..) I've written an...
1
2627
by: Pierre Rouleau | last post by:
Hi all, When building a exe for a Python application under Windows XP with The McMillan installer, the insttaltion succeeds but when I run the resulting executable the application tracebacks...
1
1304
by: =?ISO-8859-1?Q?Michael_Str=F6der?= | last post by:
HI! I have a simple codec module for T.61 which principally works. I'd like to use this codec without having to copy the module to lib/python/encodings/. Is that possible? Can I can extend the...
0
7418
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...
1
7075
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
7508
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...
1
5063
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
4737
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...
0
3222
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...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
446
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...

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.