Closed ati666 closed 10 months ago
If you do something like
import requests
requests.get("https://example.com")
do you get a similar error?
If so, you're probably behind a proxy that's signing with its own cert. The library requests
uses certs from certifi
, rather than the system certs, so it won't necessarily see the proxy's own cert as valid, even if the system generally does.
You can override this behaviour of you want your traffic to trust this intermediate cert. In Windows you can override this by with something like the pip-system-certs
package. On Linux, you can set an environment variable pointing either/both requests
and urllib
at the system ca certs.
Thanks! I Think my VPN was the root-cause of this issue as I now I don't get that error.
from datetime import datetime, timedelta
from ryanair import Ryanair
api = Ryanair(currency="EUR") # Euro currency, so could also be GBP etc. also
tomorrow = datetime.today().date() + timedelta(days=1)
flights = api.get_cheapest_flights("DUB", "2023-09-22", "2023-09-23")
and for this I'm getting
File "C:\Users\user\PycharmProjects\flypy\venv\lib\site-packages\backoff\_common.py", line 29, in _init_wait_gen
initialized = wait_gen(**kwargs)
TypeError: 'staticmethod' object is not callable
do you have any idea whats wrong?
What version of python are you on? I don't seem to be getting this when running the sample you provided.
Please see https://github.com/cohaolain/ryanair-py/issues/13 for updates on your TypeError: 'staticmethod' object is not callable
issue.
Why do I get CERTIFICATE_VERIFY_FAILED error?
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.ryanair.com', port=443): Max retries exceeded with url: /hu/hu (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)')))
All my code was just the initalization: