instagrapi
instagrapi copied to clipboard
Cannot import name 'Client' from partially initialized module 'instagrapi'
Describe the bug
I've installed instagrapi using python -m pip install instagrapi
. Then I try to to run python instagrapi.py
(code below) and get an error.
To Reproduce
from instagrapi import Client
cl = Client()
cl.login("username", "L0ngP@ssword!")
followers = cl.user_followers(cl.user_id, 10)
print(followers)
Traceback
Exception has occurred: ImportError
cannot import name 'Client' from partially initialized module 'instagrapi' (most likely due to a circular import) (/Users/zkvvoob/Documents/Python/instagrapi.py)
File "/Users/zkvvoob/Documents/Python/instagrapi.py", line 1, in <module>
from instagrapi import Client
File "/Users/zkvvoob/Documents/Python/instagrapi.py", line 1, in <module>
from instagrapi import Client
Expected behavior Get a list of followers
Desktop (please complete the following information):
- OS: macOS 12.5.1
- Python version 3.9.12
- instagrapi version 1.16.29