[mod_python] Re: Vampire does not support packages?

Stephane Bortzmeyer bortzmeyer at nic.fr
Mon Nov 24 04:10:54 EST 2008


On Mon, Nov 24, 2008 at 10:29:29AM +1100,
 Graham Dumpleton <graham.dumpleton at gmail.com> wrote 
 a message of 44 lines which said:

>   from codevnic.lib.Config import Config
> 
> to details.py to force earlier loading does it still occur?

Yes:

...
  File "/usr/lib/python2.5/site-packages/vampire/cache.py", line 316, in importModule
    execfile(file,module.__dict__)

  File "/var/www/devel.codev-nic.generic-nic.net/details.py", line 23, in <module>
    from codevnic.lib.Config import Config

  File "/usr/lib/python2.5/site-packages/vampire/cache.py", line 518, in load_module
    return importModule(fullname,self.__directory,self.__req)

  File "/usr/lib/python2.5/site-packages/vampire/cache.py", line 179, in importModule
    raise ImportError("Vampire does not support packages.")

ImportError: Vampire does not support packages.

 
> Was the old system also using Python 2.5 and mod_python 3.3.1?

No, Python 2.4 and mod_python 3.2.10.
 
> Do you have a Vampire configuration file which sets "path" value in
> appropriate Vampire configuration section?

No

> Is 'codevnic' a real Python package, ie., with __init__.py files, 

Yes

lilith:/var/www/devel.codev-nic.generic-nic.net %  ls -alt codevnic/
total 24
drwxr-sr-x 4 root staff 4096 Nov 21 09:15 .
drwxr-sr-x 2 root staff 4096 Nov 21 09:15 transfer
drwxrwsr-x 3 root staff 4096 Nov 21 09:15 ..
-rw-r--r-- 1 root staff   74 Nov 21 09:15 __init__.py
-rw-r--r-- 1 root staff  232 Nov 21 09:15 __init__.pyc
drwxr-sr-x 2 root staff 4096 Nov 21 09:15 lib


More information about the Mod_python mailing list