Closed omega71044 closed 3 years ago
Do you have a file in your working directory which is called shodan.py
? If yes, rename it to something else, it must not clash with module names
Thanks it did work. how did you know?
Because I hacked into your computer ;)
That's a very common error, you'll find lot's of these reports all over the internet, concerning different libraries. Please close the issue if that's now solved, thanks.
Thank you for the help @sebix
When the following code is executed in visual studio code
from shodan import Shodan api = Shodan('my-api-key') ipinfo = api.host('8.8.8.8') print(ipinfo)
it throws the following error ImportError: cannot import name 'Shodan' from 'shodan'
Please help
PIP LIST Package Version
aniso8601 9.0.1 certifi 2021.5.30 charset-normalizer 2.0.4 click 8.0.1 click-plugins 1.1.1 colorama 0.4.4 Flask 2.0.1 Flask-RESTful 0.3.9 idna 3.2 itsdangerous 2.0.1 Jinja2 3.0.1 MarkupSafe 2.0.1 pip 21.2.3 pytz 2021.1 requests 2.26.0 setuptools 41.2.0 shodan 1.25.0 six 1.16.0 urllib3 1.26.6 Werkzeug 2.0.1 XlsxWriter 2.0.0