[mod_python] AttributeError: 'module' object has no attribute

Craig Warren craig.warren at encorp.com
Tue Jan 11 19:55:57 EST 2005


I am getting the following error (only sometimes)

[Tue Jan 11 17:46:02 2005] [error] [client 10.1.3.34] PythonHandler 
mod_python.psp: AttributeError: 'module' object has no attribute 'node', 
referer: https://tsws/trane/tswsv2/admin/hardware_setup.psp

This error only happens every once in awhile, then when it happens it 
will happen a few times in a row then it will work!

I have a page called "hardware_setup.psp" that at the top imports a 
module that I have place in site-packages
site-packages files

[cwarren at lapbob site-packages]$ ls -la mod_framework/
total 60
drwxrwxr-x  2 cwarren cwarren  4096 Jan 11 17:46 .
drwxr-xr-x  7 cwarren cwarren  4096 Dec 28 13:17 ..
-rw-rw-r--  1 cwarren cwarren    52 Jan  5 09:47 __init__.py
-rw-rw-r--  1 cwarren cwarren  1297 Jan  5 09:47 mpx_exceptions.py
-rw-r--r--  1 cwarren cwarren 35780 Jan  5 09:47 node.py
-rw-rw-r--  1 cwarren cwarren   132 Jan  5 09:47 utils.py
-rw-rw-r--  1 cwarren cwarren  2261 Jan  5 09:47 xmlrpc.py

__init__.py has the following in it

[cwarren at lapbob site-packages]$ cat mod_framework/__init__.py
__all__ = ['node','xmlrpc','utils','mpx_exceptions']


My psp file has at the top
<%
import mod_framework.node
.
.
.
tsws = mod_framework.node.as_node(tsws_node)
%>

and the line that it fails on is

tsws = mod_framework.node.as_node(tsws_node)

We are using python2.4 and mod_python 3.1.3


It works a lot of the times, just sometimes it doesn't

any help would be appreciated,

Thanks,
 Craig




More information about the Mod_python mailing list