Closed Monal5031 closed 2 years ago
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 e3832d19b9c50bdb4bef9233899c0e85b2712e17 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 InvalidSSLCertificateError
you were getting, try to set "verify_ssl_certs": False
in the config dict
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) :)
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