Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PatrickDekker98 opened this issue Feb 25, 2021 · 1 comment
Open

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

PatrickDekker98 opened this issue Feb 25, 2021 · 1 comment

Comments

@PatrickDekker98
Copy link


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 
@rafiepourfatemeh
Copy link

from io import StringIO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants