Closed mrkeuz closed 1 year ago
Also, with pandas == 1.5.3
it shows future incompatibles warnings. Seems this exactly places where issue raise after switching to 2.0.0
Here warnings that I got: pd_warnings.log
Thanks for the report. These things are already fixed on master as a reaction to the deprecation warnings. I actually just yesterday realized that pandas 2.0 was released two days ago. Looks like they were faster with their new major release than I was with adapting to it. I'll see if I'll maybe push a new patch release for this. I'm still looking into some other problems at the moment related to subclassing pandas objects. Those have resulted from the pandas 2.0 release and were completely unexpected. I need to assess the severity first and decide what to do.
Really cool!
Then, I will try to install master release into my project. And also try to test things. Just want to help with testing. Will add notes if found something.
Thanks! π
@theOehrly got next error on latest master 9e60248efb6a89462545947a4681c76bb3014ecc
just at first import fastf1
/home/user/.cache/pypoetry/virtualenvs/f1-telem-y3ewXBhG-py3.8/bin/python /home/user/Projects/_Learn/python/f1_telem/plot_qualifying_results.py
Traceback (most recent call last):
File "/home/user/Projects/_Learn/python/f1_telem/plot_qualifying_results.py", line 4, in <module>
import fastf1
File "/home/user/.cache/pypoetry/virtualenvs/f1-telem-y3ewXBhG-py3.8/lib/python3.8/site-packages/fastf1/__init__.py", line 59, in <module>
from fastf1.events import (get_session, # noqa: F401
File "/home/user/.cache/pypoetry/virtualenvs/f1-telem-y3ewXBhG-py3.8/lib/python3.8/site-packages/fastf1/events.py", line 172, in <module>
from fastf1.core import Session
File "/home/user/.cache/pypoetry/virtualenvs/f1-telem-y3ewXBhG-py3.8/lib/python3.8/site-packages/fastf1/core.py", line 54, in <module>
from fastf1 import api, ergast
ImportError: cannot import name 'ergast' from partially initialized module 'fastf1' (most likely due to a circular import) (/home/user/.cache/pypoetry/virtualenvs/f1-telem-y3ewXBhG-py3.8/lib/python3.8/site-packages/fastf1/__init__.py)
I cannot reproduce this even in a clean environement. How did you install from master?
With Poetry tool. It can add dependencies that point right to git repo.
Here project sample: f1_telem_test.zip
To run:
pip3 install poetry
cd f1_telem_test
# Install deps to venv
poetry update
# Run inside venv
poetry run python3 main.py
python3.8
Reproduced now on clean env. Of course maybe something wrong with Poetry. Think it is not issue then.
Same result via (without venv):
pip3 install 'git+https://github.com/theOehrly/Fast-F1.git@master'
Ok, I managed to reproduce it now. I'll look into it
@mrkeuz the import error should be fixed now
Confirm. Working! π
I also made a new maintenance patch release v2.3.2 just now that limits pandas to <2.0.0 on clean installations. This should at least prevent the problem that you get errors on a fresh install until the next proper release with support for pandas 2.0
Describe the issue:
Casue
I use isolated and fresh env for running Fast-F1. Judging
setup.cfg
https://github.com/theOehrly/Fast-F1/blob/79fa22efdc47c7ffdcfbcddef54d6ec8905dfd65/setup.cfg#L22
So it's installing the latest pandas == 2.0.0.
After that I got next error (see error log).
Solution
If you pin
pandas == 1.5.3
(latest before major) seems all work as expected. Think temporary solution is can be to pin pandas version to1
until compatibility problems will not be solved.Full error log issue_pd.log
Reproduce the code example:
Error message: