try:
resp = self.session.request(
method, url, params=params, headers=headers,
- data=post_data, json=json_payload, timeout=self.timeout,
- auth=auth, proxies=self.proxy
+ data=post_data, files=files, json=json_payload,
+ timeout=self.timeout, auth=auth, proxies=self.proxy
)
except Exception as e:
- raise TweepError(f'Failed to send request: {e}').with_traceback(sys.exc_info()[2])
+ raise TweepyException(f'Failed to send request: {e}').with_traceback(sys.exc_info()[2])
if 200 <= resp.status_code < 300:
break