Open Nickhenry784 opened 11 months ago
instad-web-1 | Traceback (most recent call last):
instad-web-1 | File "/app/app.py", line 10, in
I had the same issue. switching to python 3.11 works for me
Switch to python 3.10
Hey guys, the issue comes from types.py in /Python/3.9/lib/python/site-packages/instagrapi/types.py. In line 125 the old union operator is used. change line 2 to from typing import List, Optional, Union
and change line 25 to pk: Union[str, int]
. repeat the same process anytime |
is used. hope that makes sense lol.
Try Instagrapi SaaS with a free trial https://hikerapi.com/p/5GBWznd3
Describe the bug A clear and concise description of what the bug is.
To Reproduce Provide a piece of code to reproduce the problem.
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.
Desktop (please complete the following information):
Additional context Add any other context about the problem here. Hello, I was testing your package and got this error. from instagrapi import Client
cl = Client() USERNAME = "abc" PASSWORD = "sdeerre"
cl.login(USERNAME, PASSWORD)
Error: Traceback (most recent call last): File "f:\Python\ins.py", line 1, in
from instagrapi import Client
File "~\Python\Python39\lib\site-packages\instagrapi__init__.py", line 7, in
from instagrapi.mixins.account import AccountMixin
File "~\Python\Python39\lib\site-packages\instagrapi\mixins\account.py", line 8, in
from instagrapi.extractors import extract_account, extract_user_short
File "~\Python\Python39\lib\site-packages\instagrapi\extractors.py", line 6, in
from .types import (
File "~\Python\Python39\lib\site-packages\instagrapi\types.py", line 130, in
class Media(BaseModel):
File "~\Python\Python39\lib\site-packages\instagrapi\types.py", line 131, in Media
pk: str | int
TypeError: unsupported operand type(s) for |: 'type' and 'type'