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

PBP data not available for 2022 #85

Closed
nateb7722 opened this issue Feb 26, 2024 · 8 comments
Closed

PBP data not available for 2022 #85

nateb7722 opened this issue Feb 26, 2024 · 8 comments
Labels
bug Something isn't working question Further information is requested

Comments

@nateb7722
Copy link

nateb7722 commented Feb 26, 2024

I haven't had this problem before but for some reason I am getting the response "data not available for 2022" from import_pbp function. Running on macOS, python 3.10.13, pandas version 2.2.1

@roe-men
Copy link

roe-men commented Jul 4, 2024

also not seeing data for 2023....

@JonBraund
Copy link

Possibly related to your problems, I am seeing a bug with the fastparquet library and numpy versions 2+ related to np.float_ being removed. It was in a fresh installation, python 3.12.4, jupyterlab + nfl_data_py. The final error from nfl data was that the year was not available, but the stack trace showed the actual bug.

I added this to my imports to patch the problem:

import numpy as np

np.float_ = np.float64

Got the suggestion from here:
https://stackoverflow.com/a/78721422

Downgrading numpy didn't work.

@Brigidi
Copy link

Brigidi commented Sep 9, 2024

Thanks for you post Jon — I came here bc I had this issue. I followed the first recommendation in the StackOverflow post where I uninstalled numpy and then used:

pip install "numpy<2"

Posting for transparency

Possibly related to your problems, I am seeing a bug with the fastparquet library and numpy versions 2+ related to np.float_ being removed. It was in a fresh installation, python 3.12.4, jupyterlab + nfl_data_py. The final error from nfl data was that the year was not available, but the stack trace showed the actual bug.

I added this to my imports to patch the problem:

import numpy as np

np.float_ = np.float64

Got the suggestion from here: https://stackoverflow.com/a/78721422

Downgrading numpy didn't work.

@alecglen
Copy link
Member

@JonBraund that is a separate issue. As discussed in #98 (comment), I caution against using nfl_data_py with numpy and pandas 2.0+ as they aren't yet supported and multiple issues stemming from the upgrade have been reported. I would downgrade to the latest 1.X versions for now, and keep an eye out for support via nfl_data_py 1.0 later this year!

@alecglen
Copy link
Member

@nateb7722, @roe-men - are you still seeing missing 2022 and 2023 data now? I tried with the same python and package versions you specified, but I haven't been able to reproduce that issue yet.

Whether it's related or not, note my comment above regarding avoiding pandas 2.0+ for now.

@alecglen alecglen added bug Something isn't working question Further information is requested labels Sep 20, 2024
@nateb7722
Copy link
Author

using np.float_ = np.float64 worked for me, haven't had this issue since

@alecglen
Copy link
Member

@nateb7722 I published a new version of the package last night. You can install it with the command below, and then you shouldn't need the np.float_ = np.float64 patch anymore.

pip install --force-reinstall nfl_data_py==0.3.3

If you encounter that issue again with the new version, let me know and I'll re-open your ticket.

@JonBraund
Copy link

@nateb7722 I published a new version of the package last night. You can install it with the command below, and then you shouldn't need the np.float_ = np.float64 patch anymore.

pip install --force-reinstall nfl_data_py==0.3.3

If you encounter that issue again with the new version, let me know and I'll re-open your ticket.

Thank you, the change you made helped downgrade the dependencies in my environment properly. It seems to have resolved some other strange behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants