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
I believe for the user_medias method, the user_id: int parameter should be user_pk: str since there is no id field on the Users model in types.py, and the pk field is a str.
I had been using the pk without issue, but recently turned on typing on my project, and have to convert these from str to int to make typing error go away, but it seems like it was set as int by mistake.
There are a few other methods in this file that accept a user_id: int parameter that probably also require an update for typing to be consistent.
I believe for the
user_medias
method, theuser_id: int
parameter should beuser_pk: str
since there is noid
field on theUsers
model intypes.py
, and thepk
field is a str.I had been using the
pk
without issue, but recently turned on typing on my project, and have to convert these fromstr
toint
to make typing error go away, but it seems like it was set asint
by mistake.There are a few other methods in this file that accept a
user_id: int
parameter that probably also require an update for typing to be consistent.https://github.com/adw0rd/instagrapi/blob/f1f3175e4eb130f46dc3626211e92cabc954eabb/instagrapi/mixins/media.py#L652-L666
https://github.com/adw0rd/instagrapi/blob/f1f3175e4eb130f46dc3626211e92cabc954eabb/instagrapi/types.py#L20-L33
The text was updated successfully, but these errors were encountered: