[mod_python] PythonImport failure

Chris Hagner CHagner at fool.com
Thu Mar 15 01:08:02 EST 2001


Greetings,

I'm trying to get the PythonImport command to work.  Been through the
documentation, but it appears to want more than simply inserting 

   PythonImport mypackage.mymodule

within my Directory tags in httd.conf.

While mypackage.mymodule is under the standard python lib directory
(therefore should be found through the sys.path), the system spat out the
following...

    ...[error] directive_PythonImport: error importing mypackage.mymodule

I then moved the module to a different directory and appended that directory
to the sys.path using the PythonPath command (just to see if that allowed it
to find the module).  No luck.

I've found a handful of posts from June and August of last year, but no
posted solutions to getting the PythonImport command to work correctly.  Of
course, there's a CVS commit with the comment "PythonImport works now" so
I'm pretty sure it's me...

As a random test, I tried a standard module...

   PythonImport sys

which appeared to work (no error msg), but I'm not really confident that
this was a meaningful test.

Thanks in advance.

Chris
chagner _at_ fool _dot_ com





More information about the Mod_python mailing list