[Answered ]-CStringIO.StringIO() is not working

2👍

cStringIO is not available in your environment.

I suggest you do something like this:

try:
  from cStringIO import StringIO
except ImportError:
  from StringIO import StringIO

Update

For Python 3, please use this io module and BytesIO class:

from io import BytesIO

Leave a comment