Mod_python psp import module problem

P

py.adriano

Hi folks...

I'm getting a weird problem while loading psp module from mod_python.
It only happen somethimes, and I just can't figure out why.
I saw other threads in other lists over the net, but none of them
solved the problem.
My last hope is this last thread before been forced to change my
project language.

This is the output that I got:

"""

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 361,
in apply_fs_data
return object(**args)

File "/var/www/quiron/core/CadastrarUsuario.py", line 37, in
cadastrar
login = mod_python.psp.PSP (req, raiz+'FormCadastraUsuario.psp')

AttributeError: 'module' object has no attribute 'psp'

"""

Does anybody here can give some hope about this matter??


[]'s!
 
G

grahamd

May be related to this bug:

http://issues.apache.org/jira/browse/MODPYTHON-12

Where you have:

import mod_python.psp

change it to:

psp = apache.import_module("mod_python.psp")

Access the PSP object then as:

psp.PSP

and not:

mod_python.psp.PSP

It will happen where somewhere else within the same document tree
there is a PythonHandler specified as mod_python.psp as well as
the explicit import of mod_python.psp. Depending on which ones gets
triggered first, it will screw up.

Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top