Using PSE under Win32

E

Eduardo Dobay

Hello, I've been playing around with mod_python these days (using
Publisher and PSP), and it has been working smoothly under Windows XP
(using Apache 2.2). But when I installed PSE and went to use it with
mod_python, it didn't work. The error I get whenever I try to load a
PSE page is:

Traceback (most recent call last):

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1229, in _process_target
result = _execute_target(config, req, object, arg)

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1128, in _execute_target
result = object(arg)

TypeError: 'module' object is not callable


I thought it could be some incompatibility issue between PSE and
mod_python, but I tried both installing the PSE binary and building
the sources, and it didn't make a difference. Has anyone out there had
success using PSE under Windows?

(Just for the record, I did install matching versions, at least for
Apache (2.2.3), Python (2.5) and mod_python (3.3.1). PSE doesn't seem
to have a strict version requirement.)
 
G

Graham Dumpleton

Hello, I've been playing around withmod_pythonthese days (using
Publisher and PSP), and it has been working smoothly under Windows XP
(using Apache 2.2). But when I installed PSE and went to use it withmod_python, it didn't work. The error I get whenever I try to load a
PSE page is:

Traceback (most recent call last):

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1229, in _process_target
result = _execute_target(config, req, object, arg)

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1128, in _execute_target
result = object(arg)

TypeError: 'module' object is not callable

I thought it could be some incompatibility issue between PSE andmod_python, but I tried both installing the PSE binary and building
the sources, and it didn't make a difference. Has anyone out there had
success using PSE under Windows?

(Just for the record, I did install matching versions, at least for
Apache (2.2.3), Python (2.5) andmod_python(3.3.1). PSE doesn't seem
to have a strict version requirement.)

What do you have PythonHandler set to and what does it identify? The
error above suggests that whatever you identify as the handler is not
a callable object like a function. Are you perhaps identifying some
sort of PSE template object as target when you shouldn't be? Post your
handler code so we can see it.

Graham
 
E

Eduardo Dobay

What do you have PythonHandler set to and what does it identify? The
error above suggests that whatever you identify as the handler is not
a callable object like a function. Are you perhaps identifying some
sort of PSE template object as target when you shouldn't be? Post your
handler code so we can see it.

Graham

Hello, thanks for the answer. I just found the problem. I had written
in my Apache conf
PythonHandler pse_handler
because I had seen it in PSE manual. But now I tried to google some
more and found this wiki page <http://trac.gerf.org/pse/wiki/
PSE4Setup> that says that I should instead write
PythonHandler pse_handler::mp_handler

Apparently this behaviour changed in 4.0 beta (I found no mention to
it in PSE's official site), but I'm almost sure the same error
happened when I installed 3.0.6 and tried to run a test script.
Anyway, I think that's it for now.

Eduardo
 

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,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top