nahamsec / JSParser

783 stars 178 forks source link

No module named 'StringIO' #56

Open sumit554 opened 2 years ago

sumit554 commented 2 years ago

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 commented 2 years ago

replace import StringIO to from io import StringIO

sumit554 commented 2 years ago

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 commented 2 years ago

already present urlparse handler.py

kpomeroy1979 commented 1 year ago

I get the exact same error when trying ghosts suggestion.

shishirs4 commented 11 months ago

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