[mod_python] Re: Vampire does not support packages?

Graham Dumpleton graham.dumpleton at gmail.com
Mon Nov 24 05:33:15 EST 2008


Try setting:

 PythonOption mod_python.legacy.importer *

The new module importer in mod_python 3.3.1 is based on the one from
Vampire. They shouldn't interfere with each other, but possibly they
are.

The above directive will set back mod_python module importer to what
it was in mod_python 3.2.10.

Graham

2008/11/24 Stephane Bortzmeyer <bortzmeyer at nic.fr>:
> 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