stanvanrooy / instauto

Simple to use wrapper around the private Instagram API, written in Python.
https://instauto.readthedocs.io
MIT License
105 stars 24 forks source link

instauto profile_set_picture error #155

Closed phlaskoo closed 3 years ago

phlaskoo commented 3 years ago

trying to update profile picture but get bellow error:

Traceback (most recent call last): File "C:/Users/Hosseinpour/Desktop/instabot/instabot2.py", line 62, in m.SET_PICTURE('background.jpg') File "C:/Users/Hosseinpour/Desktop/instabot/instabot2.py", line 55, in SET_PICTURE status=self.client.profile_set_picture(action) File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\profile.py", line 57, in profile_set_picture internal() File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\profile.py", line 55, in internal self.profile_update(Update(None)) File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\structs\profile.py", line 43, in init raise ValueError("No value(s) to update provided.") ValueError: No value(s) to update provided.

I use windows and latest pip version of instauto and python 3.9 better to mention that I add profile_set_picture and SetPicture methods manually because it was not in pip version of instauto

stanvanrooy commented 3 years ago

You'll also need to overwrite https://github.com/stanvanrooy/instauto/blob/master/instauto/api/actions/profile.py#L10. In your version, there is probably a check there that asserts at least one value will be updated.

phlaskoo commented 3 years ago

Traceback (most recent call last): File "<pyshell#25>", line 1, in m.SET_PICTURE('background.jpg') File "C:/Users/Hosseinpour/Desktop/instabot/instabot2.py", line 56, in SET_PICTURE status=self.client.profile_set_picture(action) File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\profile.py", line 49, in profile_set_picture return self._request("accounts/change_profile_picture/", Method.POST, body=data) File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\request.py", line 60, in _request self._check_response_for_errors(resp) File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\request.py", line 105, in _check_response_for_errors raise BadResponse("Received a non-200 response from Instagram") instauto.api.exceptions.BadResponse: Received a non-200 response from Instagram

get this error after updating and also check profile picture dimensions too but no result also there is problem that I can not retrieve more than 12 posts of a user and another problem is that I can not access followers or followings of a user

On Thu, May 6, 2021 at 1:01 AM Stan van Rooy @.***> wrote:

You'll also need to overwrite https://github.com/stanvanrooy/instauto/blob/master/instauto/api/actions/profile.py#L10. In your version, there is probably a check there that asserts at least one value will be updated.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stanvanrooy/instauto/issues/155#issuecomment-832986766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2MUCHZ2CVYCZH2DWVFFEDTMGTITANCNFSM44FE6AUQ .

stanvanrooy commented 3 years ago

Could you create an issue, for each one of those errors. With reproduction steps.

phlaskoo commented 3 years ago

Sure, I will do that.

On Fri, May 7, 2021 at 1:09 AM Stan van Rooy @.***> wrote:

Could you create an issue, for each one of those errors. With reproduction steps.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stanvanrooy/instauto/issues/155#issuecomment-833845437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2MUCBB7O4WTFNGUOHMKHTTML5BXANCNFSM44FE6AUQ .