Skip to content

ImportError: No module named 'StringIO' for python3 #36

@PatrickDekker98

Description

@PatrickDekker98


This line gives ModuleNotFoundError: No module named 'StringIO' in python3

From https://docs.python.org/3.0/whatsnew/3.0.html

The StringIO and cStringIO modules are gone. Instead, import the io module and use io.StringIO or io.BytesIO for text and data respectively.

possible solution:

try:
    import StringIO 
except ImportError:
    from io import StringIO 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions