You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi im pretty new to python but i think i tried the easiest thing to do with this API but it doesn't work.
I also tried to copy code 1 to 1 from youtube videos and it does not work aswell.
Thanks for ur help in advance
Traceback (most recent call last):
File "c:\Users\xx\Documents\python\xx.py", line 8, in <module>
userid = cl.user_id_from_username("xx")
File "C:\Users\xx\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\user.py", line 50, in user_id_from_username
return str(self.user_info_by_username(username).pk)
File "C:\Users\xx\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\user.py", line 200, in user_info_by_username
y_username_v1
return extract_user_v1(result["user"])
File "C:\Users\xx\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\extractors.py", line 216, in extract_user_v1
return User(**data)
File "C:\Users\xx\AppData\Local\Programs\Python\Python310\lib\site-packages\pydantic\main.py", line 165, in __init__
__pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 5 validation errors for User
pk
Input should be a valid string [type=string_type, input_value=173560420, input_type=int]
For further information visit https://errors.pydantic.dev/2.3/v/string_type
business_category_name
Field required [type=missing, input_value={'biography': 'Join my NF...4FBC08E&_nc_sid=2fe71f'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.3/v/missing
category_name
Field required [type=missing, input_value={'biography': 'Join my NF...4FBC08E&_nc_sid=2fe71f'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.3/v/missing
city_id
Input should be a valid string [type=string_type, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.3/v/string_type
interop_messaging_user_fbid
Field required [type=missing, input_value={'biography': 'Join my NF...4FBC08E&_nc_sid=2fe71f'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.3/v/missing
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi im pretty new to python but i think i tried the easiest thing to do with this API but it doesn't work.
I also tried to copy code 1 to 1 from youtube videos and it does not work aswell.
Thanks for ur help in advance
my code:
xx is replaced ofc
i get this error:
Beta Was this translation helpful? Give feedback.
All reactions