[mod_python] unicode() conversion troubles with mod_python 3 CVS 27.06.2002

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Oct 24 17:43:20 EST 2002


In my case upgrading to Python 2.2.2 eliminated all encodings weirdness.

Grisha

On Thu, 24 Oct 2002, Eugene Sizikov wrote:

> Hello all ppl!
>
> I have troubles with unicode conversion with mod_python from RedHat 8.0
> distro. The errorlog is:
>
> "
> Mod_python error: "PythonHandler mod_python.publisher"
>
> Traceback (most recent call last):
>
>   File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 285, in
> HandlerDispatch
>     result = object(req)
>
>   File "/usr/lib/python2.2/site-packages/mod_python/publisher.py", line 175,
> in handler
>     result = apply(object, (), args)
>
>   File "/var/www/html/teleross/user.py", line 137, in start
>     html = '%s [%s]<HR>' % (string_sql_to_html(user.fullname),
> Group(user.con, user.gid).fullname) + menu.to_html()
>
>   File "/var/www/html/teleross/utils.py", line 4, in string_sql_to_html
>     return unicode(s, 'koi8-r')
>
>   File
> "/usr/src/build/143041-i386/install/usr/lib/python2.2/encodings/__init__.py"
> , line 51, in search_function
>
> RuntimeError: cannot unmarshal code objects in restricted execution mode
> "
>
> So, when it has "unicode(s, 'koi8-r')" it crashes with that interesting
> message I can't understand.
>
> Please, help!
>
> Eugene.
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
>




More information about the Mod_python mailing list