ExceptionHandler
ExceptionHandler

Reputation: 223

ImportError: No module named cStringIO

I am a python Noob and I am stuck with this particular error. I am trying to run a python script within my bash script. The error log looks like this

File "Alpha_Beta.py", line 6, in <module>
    import pdb
  File "C:\softs\Python\Lib\pdb.py", line 14, in <module>
  File "C:\softs\Python\Lib\pprint.py", line 39, in <module>
ImportError: No module named cStringIO

This is on my ubuntu machine.

Can anyone please help me fix this bug?

By looking at the replies and the traceback I do figure out, it is probably something to do with the fact that the file was initially being used in Windows environment. Currently I am trying to compile this file on ubuntu. I hope this makes it more clear.

Also this file compiles without any problems when I run on the windows machine. Not the same with ubuntu. So I need help to figure out , how to debug this. Should I change something within the pdb module or should I look elsewhere.

Upvotes: 1

Views: 6995

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1123440

You are running this on a Windows machine, but if this from a shared Ubuntu drive then the cStringIO extension will not import; it'll be compiled for running on Linux, not Windows.

Upvotes: 3

Related Questions