Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installed but not really able to do anything #13

Closed
FMPete opened this issue Mar 12, 2021 · 2 comments
Closed

Installed but not really able to do anything #13

FMPete opened this issue Mar 12, 2021 · 2 comments

Comments

@FMPete
Copy link

FMPete commented Mar 12, 2021

Hello,

sorry for being a complete beginner to programming. But I'm not able to really do anything. just tried the example provided:

"import fastf1 as ff1
from fastf1 import plotting
from matplotlib import pyplot as plt
plotting.setup_mpl()
ff1.Cache.enable_cache('path/to/folder/for/cache') # optional but recommended
race = ff1.get_session(2020, 'Turkish Grand Prix', 'R')
laps = race.load_laps()
lec = laps.pick_driver('LEC')
ham = laps.pick_driver('HAM')"

So I'm getting an error code of:

"File "C:****\F1\F1FastTest.py", line 12, in plotting.setup_mpl()
AttributeError: module 'fastf1.plotting' has no attribute 'setup_mpl'"

and if I comment it out it gets stuck at:

"File "C:**\anaconda3\envs\spyder\lib\site-packages\requests_cache\backends\storage\dbdict.py", line 74, in connection
con = sqlite.connect(self.filename)
OperationalError: unable to open database file"

I tried several Python versions but didn't seem to fix the issue. Is it because ther eis a live session going on? Or am I just too stupid to operate this :)

Peter

@theOehrly
Copy link
Owner

Hi, that very much looks like you do not have the newest version installed?
Did you install using pip install fastf1? If yes, did you have a previous version installed? Try to do a clean installation of the fastf1 package.

Also, the string 'path/to/folder/for/cache' needs to be replaced with a valid path to an existing folder. But that should raise a different error.

@FMPete
Copy link
Author

FMPete commented Mar 23, 2021

Thanks, sorry for late answer but that solved my issues!

@FMPete FMPete closed this as completed Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants