response = self.httpx_client.request(*args, **kwargs)
95 if _should_retry(response=response):
---> 96 if max_retries > retries:
97 time.sleep(_retry_timeout(response=response, retries=retries))
98 return self.request(max_retries=max_retries, retries=retries + 1, *args, **kwargs)
TypeError: '>' not supported between instances of 'NoneType' and 'int'
The reason is because of None value for max_retries.
Other similar codes should also have corresponding issues, so I made some modifications together.
Reproduce code(Due to various reasons, the api request failed, such as rate limiting.):
Exception stack trace:
The reason is because of
None
value formax_retries
.Other similar codes should also have corresponding issues, so I made some modifications together.