-
I can successfully run the following code on a personal computer on a home network. However, I receive an error when trying to run on an old work computer on the same network.
Error: When working directly through the Ergast API, I successfully retrieve data by setting |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@ac1987 I can't really tell what the root issue here is. Most likely the machine is missing one of the required root certificates. Either because it is an old OS maybe. Or because of some IT security policy. (Or an old version of Python?) In any case, you should be able to use the HTTP endpoint of Ergast instead of HTTPS by overwriting this at the beginning of every script that you run. Example (not tested, but I think this should work): from fastf1.ergast import interface
interface.BASE_URL = 'http://ergast.com/api/f1'
.... your other code .... |
Beta Was this translation helpful? Give feedback.
-
@theOehrly Many thanks! That worked! I am using Python 3.10.5. on Windows10. I am leaning to it being the IT security policy. Applying this method to the livetiming url has appeared to have fixed the other issue I was encountering while trying to load and cache data via fastf1.
Any idea why a security policy would cause my system to not have the required root certificates? Thanks again! |
Beta Was this translation helpful? Give feedback.
@ac1987 I can't really tell what the root issue here is. Most likely the machine is missing one of the required root certificates. Either because it is an old OS maybe. Or because of some IT security policy. (Or an old version of Python?)
In any case, you should be able to use the HTTP endpoint of Ergast instead of HTTPS by overwriting this at the beginning of every script that you run.
Example (not tested, but I think this should work):