error while importing os

K

karan

Hi,

Iam new to python i see the following when iam in the python shell and
i try to import os,though i can import the sys and sys.path does
contain the path to the python binary or the folder where the python
binaries reside:

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Perf\qa\test\build\vmqa\python\python-2.4.1-as\lib\os.py",
line 683, in ?
import copy_reg as _copy_reg
File "C:\Perf\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)

I have the added the path to the Python which contain the python
binaries,DLLs to the PYTHONPATH.


Let me know what might be the reason for getting this error.

Thanks.
 
J

Jason Scheirer

Hi,

Iam new to python i see the following when iam in the python shell and
i try to import os,though i can import the sys and sys.path does
contain the path to the python binary or the folder where the python
binaries reside:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Perf\qa\test\build\vmqa\python\python-2.4.1-as\lib\os.py",
line 683, in ?
    import copy_reg as _copy_reg
  File "C:\Perf\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)

I have the added the path to the Python which contain the python
binaries,DLLs to the PYTHONPATH.

Let me know what might be the reason for getting this error.

Thanks.

Looks like you have an errant dynamic library -- look for types.pyd on
your pythonpath and make sure the right one is getting imported.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top