Cache error #338
Unanswered
arnoutvanee
asked this question in
Q&A
Cache error
#338
Replies: 1 comment 3 replies
-
Here, |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I've been trying to get fastf1 to work for about a week now. I am new to working with Python so I have done some reading on how to get fastf1 to work. I use Pycharm for my projects. As far as I know I have installed all pips needed. However I keep running into the same problem.
When using the first simple code ...
import fastf1
session = fastf1.get_session(2019, 'Monza', 'Q')
session.load(telemetry=False, laps=False, weather=False)
vettel = session.get_driver('VET')
print(f"Pronto {vettel['FirstName']}?")
.... from the 'Getting Started' example, I do yield the result 'Pronto Sebastian?', however with the following message:
api WARNING
NO CACHE! Api caching has not been enabled!
It is highly recommended to enable this feature for much faster data loading!
Use
fastf1.Cache.enable_cache('path/to/cache/')
core INFO Loading data for Italian Grand Prix - Qualifying [v2.3.1]
api INFO Fetching driver list...
core WARNING Failed to load data from Ergast API! (This is expected for recent sessions)
api INFO Fetching race control messages...
core INFO Finished loading data for 20 drivers: ['5', '18', '8', '20', '7', '4', '10', '11', '55', '26', '99', '23', '27', '44', '3', '16', '77', '33', '63', '88']
Pronto Sebastian?
Process finished with exit code 0
When I include
fastf1.Cache.enable_cache('path/to/cache/')
as recommended I get no result but I do get the following error code:Traceback (most recent call last):
File "C:\Users\arnou\PycharmProjects\pythonProject2\pip\main.py", line 2, in
fastf1.Cache.enable_cache('path/to/cache/')
File "C:\Users\arnou\PycharmProjects\pythonProject2\pip\venv\lib\site-packages\fastf1\api.py", line 137, in enable_cache
raise NotADirectoryError("Cache directory does not exist! Please check for typos or create it first.")
NotADirectoryError: Cache directory does not exist! Please check for typos or create it first.
Process finished with exit code 1
And I have been getting the same error code with whichever other code I have taken from the https://theoehrly.github.io/Fast-F1/ page.
So it seems I am doing something wrong relating to the cache...
I have been searching endlessly online how to fix this but I can't find a solution to this error code.
Can you please help me?
I am looking forward tremendously to start working with fastf1, lifelong F1 fan!
Many thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions