instagrapi
instagrapi copied to clipboard
[BUG] TypeError: unsupported operand type(s) for |: 'type' and 'type'
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):
- OS: [e.g. Ubuntu 21.04]
- Python version [e.g. 3.8.3]
- instagrapi 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. 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
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.