You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the ingestor on any non POSIX/Unix platform results in a malformed URL and inability to parse the returned JSON. The specific error I get is as follows:
Traceback (most recent call last):
File "C:\Users\prest\OneDrive\Documents\Projects\openf1\ingestor\ingest_history.py", line 196, in <module>
cli()
File "c:\Users\prest\OneDrive\Documents\Projects\openf1\.venv\Lib\site-packages\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\prest\OneDrive\Documents\Projects\openf1\.venv\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "c:\Users\prest\OneDrive\Documents\Projects\openf1\.venv\Lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\prest\OneDrive\Documents\Projects\openf1\.venv\Lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\prest\OneDrive\Documents\Projects\openf1\.venv\Lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\prest\OneDrive\Documents\Projects\openf1\ingestor\ingest_history.py", line 178, in ingest_session
asyncio.run(_ingest_session(*args, **kwargs))
File "C:\Python312\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\asyncio\base_events.py", line 685, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\prest\OneDrive\Documents\Projects\openf1\ingestor\ingest_history.py", line 149, in _ingest_session
session_path = get_session_path(year=year, meeting_key=meeting_key, session_key=session_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\prest\OneDrive\Documents\Projects\openf1\ingestor\ingest_history.py", line 85, in get_session_path
for meeting in _get_schedule(year)['Meetings']:
^^^^^^^^^^^^^^^^^^^
File "C:\Users\prest\OneDrive\Documents\Projects\openf1\ingestor\ingest_history.py", line 30, in _get_schedule
return json.loads(requests.get(url).content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
After some debug printing, I discovered that the URL it was trying to get was https://livetiming.formula1.com/static\2023/Index.json. The backslash is because the script uses os.path.join to join the parts of the URL.
The text was updated successfully, but these errors were encountered:
Running the ingestor on any non POSIX/Unix platform results in a malformed URL and inability to parse the returned JSON. The specific error I get is as follows:
After some debug printing, I discovered that the URL it was trying to get was
https://livetiming.formula1.com/static\2023/Index.json
. The backslash is because the script usesos.path.join
to join the parts of the URL.The text was updated successfully, but these errors were encountered: