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

No module named 'StringIO' #56

Open
sumit554 opened this issue Dec 1, 2021 · 5 comments
Open

No module named 'StringIO' #56

sumit554 opened this issue Dec 1, 2021 · 5 comments

Comments

@sumit554
Copy link

sumit554 commented Dec 1, 2021

Traceback (most recent call last):
File "/root/tools/JSParser/handler.py", line 5, in
import safeurl, types, sys, re, mimetypes, glob, jsbeautifier, urlparse, pycurl
File "/root/tools/JSParser/safeurl.py", line 18, in
import StringIO
ModuleNotFoundError: No module named 'StringIO'

Pls help me to solve this issues

@ghost
Copy link

ghost commented Dec 1, 2021

replace import StringIO to from io import StringIO

@sumit554
Copy link
Author

sumit554 commented Dec 1, 2021

after replacing

Traceback (most recent call last):
File "/root/tools/JSParser/handler.py", line 5, in
import safeurl, types, sys, re, mimetypes, glob, jsbeautifier, urlparse, pycurl
ModuleNotFoundError: No module named 'urlparse'

@sumit554
Copy link
Author

sumit554 commented Dec 1, 2021

already present urlparse handler.py

@kpomeroy1979
Copy link

I get the exact same error when trying ghosts suggestion.

@shishirs4
Copy link

replace import safeurl, types, sys, re, mimetypes, glob, jsbeautifier, urlparse, pycurl, StringIO
to on handler.py file

to below one

import safeurl, types, sys, re, mimetypes, glob, jsbeautifier, pycurl
from urllib.parse import urlparse
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

No branches or pull requests

3 participants