Fast-F1: [BUG] Unable to load session results

Describe the issue:

As of recent (last ~3 weeks), I’m unable to get accurate session.Results for any of the 2023 races. Was working great up through the Miami race, but now calling any race from 2023 gives no results for any of the race. Currently using version 2.3.0

Have noticed that now I see: core WARNING Failed to load data from Ergast API! (This is expected for recent sessions) in the logs, but not sure if this is expected and if so, why?

Reproduce the code example:

import fastf1

fastf1.Cache.enable_cache("cache")

session = fastf1.get_session(2023, "Miami", "Race")
session.load(telemetry=False, laps=False, weather=False)

core           INFO 	Loading data for Miami Grand Prix - Race [v2.3.0]
api            INFO 	Updating cache for driver_info...
api            INFO 	Fetching driver list...
api            INFO 	Cache updated!
core        WARNING 	Failed to load data from Ergast API! (This is expected for recent sessions)
api            INFO 	Updating cache for race_control_messages...
api            INFO 	Fetching race control messages...
api            INFO 	Cache updated!
core           INFO 	Finished loading data for 20 drivers: ['11', '18', '22', '4', '21', '24', '44', '27', '23', '77', '1', '31', '16', '63', '10', '20', '55', '14', '81', '2']

# Running `session.results` then outputs (apologies if formatting is off, will provide screenshot):

	DriverNumber	BroadcastName	Abbreviation	TeamName	TeamColor	FirstName	LastName	FullName	Position	GridPosition	Q1	Q2	Q3	Time	Status	Points
11	11	S PEREZ	PER	Red Bull Racing	3671C6	Sergio	Perez	Sergio Perez	0.0	0.0						0.0
18	18	L STROLL	STR	Aston Martin	358C75	Lance	Stroll	Lance Stroll	0.0	0.0						0.0
22	22	Y TSUNODA	TSU	AlphaTauri	5E8FAA	Yuki	Tsunoda	Yuki Tsunoda	0.0	0.0						0.0
4	4	L NORRIS	NOR	McLaren	F58020	Lando	Norris	Lando Norris	0.0	0.0						0.0
21	21	N DE VRIES	DEV	AlphaTauri	5E8FAA	Nyck	De Vries	Nyck De Vries	0.0	0.0						0.0
24	24	G ZHOU	ZHO	Alfa Romeo	C92D4B	Guanyu	Zhou	Guanyu Zhou	0.0	0.0						0.0
44	44	L HAMILTON	HAM	Mercedes	6CD3BF	Lewis	Hamilton	Lewis Hamilton	0.0	0.0						0.0
27	27	N HULKENBERG	HUL	Haas F1 Team	B6BABD	Nico	Hulkenberg	Nico Hulkenberg	0.0	0.0						0.0
23	23	A ALBON	ALB	Williams	37BEDD	Alexander	Albon	Alexander Albon	0.0	0.0						0.0
77	77	V BOTTAS	BOT	Alfa Romeo	C92D4B	Valtteri	Bottas	Valtteri Bottas	0.0	0.0						0.0
1	1	M VERSTAPPEN	VER	Red Bull Racing	3671C6	Max	Verstappen	Max Verstappen	0.0	0.0						0.0
31	31	E OCON	OCO	Alpine	2293D1	Esteban	Ocon	Esteban Ocon	0.0	0.0						0.0
16	16	C LECLERC	LEC	Ferrari	F91536	Charles	Leclerc	Charles Leclerc	0.0	0.0						0.0
63	63	G RUSSELL	RUS	Mercedes	6CD3BF	George	Russell	George Russell	0.0	0.0						0.0
10	10	P GASLY	GAS	Alpine	2293D1	Pierre	Gasly	Pierre Gasly	0.0	0.0						0.0
20	20	K MAGNUSSEN	MAG	Haas F1 Team	B6BABD	Kevin	Magnussen	Kevin Magnussen	0.0	0.0						0.0
55	55	C SAINZ	SAI	Ferrari	F91536	Carlos	Sainz	Carlos Sainz	0.0	0.0						0.0
14	14	F ALONSO	ALO	Aston Martin	358C75	Fernando	Alonso	Fernando Alonso	0.0	0.0						0.0
81	81	O PIASTRI	PIA	McLaren	F58020	Oscar	Piastri	Oscar Piastri	0.0	0.0						0.0
2	2	L SARGEANT	SAR	Williams	37BEDD	Logan	Sargeant	Logan Sargeant	0.0	0.0						0.0

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 25 (13 by maintainers)

Most upvoted comments

@SamBurky I can reproduce this problem right now. It’s a bit weird, because I can request data from this endpoint in my browser and there are no SSL certificate errors. I’m tempted to say, it’s Ergast’s fault again, but I’ll investigate it a bit more.

Edit: By the looks of it, there are some problems in the certificate chain of Ergast’s new SSL cert. Therefore, the certificate is not trusted (by some clients at least). This has already been reported so I hope it will be fixed soon.

@theOehrly Looks like it was the same issue. I added some certificates and it now runs without any SSL errors. Thanks!

The certificate issue is resolved, by the looks of it. A quick check just now seemed to show that everything works correctly again.

@jmauczoio

Atm everything from server is working again, hopefully constantly 😃

Ok, good. If the error comes back, as said, please open a separate issue. This really seems to be different.

@theOehrly by any chance do you know/have any contact for the people who maintain Ergast?

I have two servers with a 4Gbps connection each, I would be happy to provide a sort of mirror or fallback copy of the Ergast API at least until they manage to fix it.

I don’t know how this could be done, as I don’t know the origin of their problem, but I think getting at least some of the load off their servers could help.

I do know how to contact them, yes. And I will be reaching out to them within the next few days if this issue doesn’t get resolved. I’ll keep your offer in mind. I have thought about potentially creating a mirror/cache to reduce load before.

I just had a quick chat with someone else and there are some indications of ongoing server maintenance. Let’s wait and see for a bit longer.

@pbkompasz

It’s live again.

Hmm, not for me. Or it’s down again.

@jlp0422

I doubt it, but wondering if it could be related to the cancelled race at Imola a couple weeks ago?

Highly unlikely, in my opinion. Ergast has increasingly had server issues over the last few months. They have been more intermittent though.

Just to clarify, the get_session method was always using the Ergast API under the hood?

Not exactly, get_session does only download schedule data. This is done either from my own backend or as a fallback from Ergast or from the F1 API (incomplete then), in that order.

Session.load will load data from multiple endpoints of the F1 API and from Ergast, merge data from various sources, use multiple sources to partially validate the data, detect and correct errors and augment additional information, and so on. In some places, when possible, fallbacks are implemented, but this is rare.

What you are seeing now is that one data source is unavailable, and therefore the data is incomplete while other parts of FastF1 are fully functional.