[mod_python] Classic classes only

Graham Dumpleton grahamd at dscpl.com.au
Thu Mar 16 19:06:00 EST 2006


What version of mod_python are you using?

Known about this for quite a while as addressed the problem in my own
framework which duplicated publisher functionality. I can't remember if
fixed in 3.2.8 and can't check code right now.

Graham

On 17/03/2006, at 10:39 AM, Webb Sprague wrote:

> Hi all,
>
> This might have been answered somewhere else, but... When I inherit
> from an class that inherits from object (thus making a new style
> class), I get the backtrace below.  However, when I use old-style
> classes the problem goes away.  I was just wondering if someone could
> explain why, or give me a link to a discussion?
>
> Thanks
> W
>
> ###
>
> Backtrace:
>
> Mod_python error: "PythonHandler mod_python.publisher"
>
> Traceback (most recent call last):
>
>   File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
> 299, in HandlerDispatch
>     result = object(req)
>
>   File "/usr/lib/python2.4/site-packages/mod_python/publisher.py",
> line 136, in handler
>     result = util.apply_fs_data(object, req.form, req=req)
>
>   File "/usr/lib/python2.4/site-packages/mod_python/util.py", line
> 356, in apply_fs_data
>     if not (fc.co_flags & 0x08):
>
> UnboundLocalError: local variable 'fc' referenced before assignment
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list