From 995e50e67868aba9ead7960cd4ccbf370aa3b1ac Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 14 Jan 2021 05:19:19 -0600 Subject: [PATCH] Specify file parameter for API.update_profile_banner explicitly --- tweepy/api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index f83fa4f..47289e9 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -815,13 +815,12 @@ class API: require_auth=True )(self, files=files) - def update_profile_banner(self, filename, **kwargs): + def update_profile_banner(self, filename, file=None, **kwargs): """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile_banner :allowed_param: 'width', 'height', 'offset_left', 'offset_right' """ - f = kwargs.pop('file', None) headers, post_data = API._pack_image(filename, 700, - form_field='banner', f=f) + form_field='banner', f=file) return bind_api( api=self, path='/account/update_profile_banner.json', -- 2.25.1