-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for max_retries when making call from requests #381
Comments
Good catch! Thanks, this will fit into the next release :) Would you like to submit a PR yourself for this ? |
I can work on it @csparpa , although won't be able to complete it soon (I hope that's okay). If someone else wishes to work on this, please let me know. |
Never mind @Monal5031 , I've submitted e3832d1 which should do the trick By default, PyOWM will continue to apply infinite retries in calling the OWM API, but if you need to limit the number of calls this can be done via the configuration dict By the way, in order to fix the |
Thanks @csparpa for fixing the issue so fast and also for the suggestion I'll try that (I really don't want to disable SSL verification) :) |
# New features [380](#380) Implemented [National Weather Alerts](https://openweathermap.org/api/one-call-api#listsource) support [376](#376) Now PyOWM uses SQLite instead of files to internally store city data. `CityIDRegistry` interface has changed but in a retrocompatible way # Chores [381](#381) Now it is possible to specify how many times to retry an API call # Bugfixes [379](#379) Experimental fix for `404` errors on Agromonitor API satellite image search [387](#387) Fixed lat/lon swap bug on Airpollution API [389](#389) Fixed wrong city name in City ID database
I was using pyowm when I came across this error:
After looking through the code I found there is no option in config to set a
max_retries
.I was hoping this support could be added by allowing a max_retries param in any config and using it to create a new Session/Adapter for requests before making the API calls here:
https://github.com/csparpa/pyowm/blob/master/pyowm/commons/http_client.py#L131
The text was updated successfully, but these errors were encountered: