achillean / shodan-python

The official Python library for Shodan
https://developer.shodan.io
Other
2.52k stars 569 forks source link

ImportError: cannot import name 'Shodan' from partially initialized module 'shodan' #208

Closed 2028383846 closed 9 months ago

2028383846 commented 10 months ago

Hello! I encountered this error when executing after copying the official source code:

Traceback (most recent call last):
  File "D:\shodan.py", line 1, in <module>
    from shodan import Shodan
  File "D:\shodan.py", line 1, in <module>
    from shodan import Shodan
ImportError: cannot import name 'Shodan' from partially initialized module 'shodan' (most likely due to a circular import) (D:\shodan.py)

The current version of the library is: 1.30.1

2028383846 commented 10 months ago

This problem has been resolved

sebix commented 10 months ago

Then please close the issue

mlazzarotto commented 9 months ago

This problem has been resolved

@2028383846 How did you resolve the problem?


EDIT: I figured that out, I had to rename shodan.py to a different name.