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

BUG while using user_followers() code expample: followers = await cl.user_followers(cl.user_id) #59

Open
gavinchris37 opened this issue Jun 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@gavinchris37
Copy link

Try HikerAPI SaaS with a free trial https://hikerapi.com/p/KhMxYMSn

Describe the bug
followers = await cl.user_followers(cl.user_id)
when using the above function im getting the below error message in the output

To Reproduce
followers = await cl.user_followers(cl.user_id)

Traceback
Show your full traceback so that it is clear where exactly the error occurred.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Output
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/username/?__a=1&__d=dis) >>>
'NoneType' object has no attribute 'cookies'
Traceback (most recent call last):
File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\mixins\user.py", line 891, in user_followers
users = await self.user_followers_gql(user_id, amount)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\mixins\user.py", line 780, in user_followers_gql
items, end_cursor = await self.user_followers_gql_chunk(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\mixins\user.py", line 732, in user_followers_gql_chunk
self.inject_sessionid_to_public()
File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\mixins\auth.py", line 851, in inject_sessionid_to_public
self.graphql.set_cookies(cookie)
File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\reqwests.py", line 87, in set_cookies
self._client.cookies.set(k, v)
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'cookies'

Desktop (please complete the following information):

  • OS: [e.g. Ubuntu 21.04]
  • Python version [e.g. 3.8.3]
  • aiograpi version [e.g. 1.9.3, not "latest"]
  • moveipy version if used
  • imagemagick version if used

Additional context
Add any other context about the problem here.

@gavinchris37 gavinchris37 added the bug Something isn't working label Jun 12, 2024
@Paintitai
Copy link

the same bug, any idea?

@Paintitai
Copy link

@proxies.setter
def proxies(self, p):
self._proxies = p
self._set_client()

looks like setter never call

@luca-arch
Copy link

I have found a workaround, see #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants