cannot unmarshal code objects in restricted execution mode

Sam Brauer sam at webslingerZ.com
Thu Jun 20 14:18:44 EDT 2002


At the risk of annoying folks, I thought I'd re-post a question I asked a 
couple of days ago that no one responded to.  
(Yes, I'm really that desparate.)

I promise I won't post about this problem again on this list.

Any help would be much appreciated....

Thanks!!!! (and sorry for double-posting),
Sam

On Tue, 18 Jun 2002, Sam Brauer wrote:

> In the context of a long-running Python process (specifically mod_python) 
> I occasionally get the following error:
> 
> exceptions.RuntimeError: cannot unmarshal code objects in restricted 
> execution mode
> File "/usr/local/lib/python2.2/encodings/__init__.py", line 51, in 
> search_function
> mod = __import__(modname,globals(),locals(),'*')
> 
> This happens when I call code like this:
> 
> utf8string = unicode(val, enc).encode('utf-8')
> 
> where 'val' is a string in an encoding identified by the string 'enc'.
> 
> What's strange is that the vast majority of the time the error doesn't 
> occur, but after it happens once, it seems to happen more frequently 
> (although not consistently).
> 
> Does anyone know what might be the cause of this error?
> 
> 

-- 
Sam Brauer






More information about the Python-list mailing list