ImportError: dynamic module does not define init function (inittypes)

K

konteya joshi

Hi,

Iam trying to run a programs which resides insides ..\pythonroot.

I see the following error on running the program:

'import site' failed; use -v for traceback
Traceback (most recent call last):
File "skyline\alpine_kickoff.py", line 6, in ?
import re
File "C:\Perforce\qa\testware\build\vmqa\python\python-2.4.1-as\lib\re.py",
line 5, in ?
from sre import *
File "C:\Per\qa\test\build\vmqa\python\python-2.4.1-as\lib\sre.py",
line 265, in ?
import copy_reg
File "C:\Per\qa\test\build\vmqa\python\python-2.4.1-as\lib\copy_reg.py",
line 7, in ?
from types import ClassType as _ClassType
ImportError: dynamic module does not define init function (inittypes)

Any body who would have an idea on what might be going wrong?

I have python-2.4.1-as directory in my PYTHONPATH which contains the
Lib,libs...etc in the directory. The Lib contains the re,sre,copy_reg
inside the directory.

Thanks.
 
S

Stefan Behnel

konteya said:
I see the following error on running the program:

'import site' failed; use -v for traceback
Traceback (most recent call last):
File "skyline\alpine_kickoff.py", line 6, in ?
import re
File "C:\Perforce\qa\testware\build\vmqa\python\python-2.4.1-as\lib\re.py",
line 5, in ?
from sre import *
File "C:\Per\qa\test\build\vmqa\python\python-2.4.1-as\lib\sre.py",
line 265, in ?
import copy_reg
File "C:\Per\qa\test\build\vmqa\python\python-2.4.1-as\lib\copy_reg.py",
line 7, in ?
from types import ClassType as _ClassType
ImportError: dynamic module does not define init function (inittypes)

Any body who would have an idea on what might be going wrong?

I have python-2.4.1-as directory in my PYTHONPATH which contains the
Lib,libs...etc in the directory. The Lib contains the re,sre,copy_reg
inside the directory.

Check if you have a file "types.dll" somewhere in your PYTHONPATH. If
Python finds such a file when resolving the "import types" statement, it
will try to import the DLL instead of the correct module.

Stefan
 

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,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top