pickle and py2exe

Justin Straube justinstraube at charter.net
Thu Dec 2 18:48:00 EST 2004


On 1 Dec 2004 11:45:59 -0800, johan at pulp.se (Johan Lindberg) wrote:


>Have you included string-escape encoding in your setup.py?
>My guess is that you can fix the problem with something similar to:
>
> from distutils.core import setup
> import py2exe
> opts = { "py2exe": { "packages": ["encodings"], } }
> setup(windows= ["spam.py"], options= opts)
>
>in your setup.py.
>
>Hope it helps
>/Johan Lindberg

Thanks Johan,  but unfortunately the same traceback is given in the log. 
I should have mentioned in my previous post that Im using win2000, if it matters
any. 

Thanks,

Justin
>> 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 "SETIstat.pyw", line 84, in start_up
>>   File "SETIstat.pyw", line 79, in config_load
>>   File "pickle.pyc", line 1390, in load
>>   File "pickle.pyc", line 872, in load
>>   File "pickle.pyc", line 985, in load_string
>> LookupError: unknown encoding: string-escape
>> 
>> the data in the pickled file is a dictionary containing a couple strings. The
>> strings do contain \n and \t charaters but no other special characters or
>> anything. 
>> 
>> Does anyone have any suggestions to what I can try to get around this? The
>> pickle module works fine when the .pyw file is run. Its only when I compile
>> this is there an issue. 
>> 
>> Thanks for any help,
>> 
>> Justin
>



More information about the Python-list mailing list