Is there an existing issue for this?
Have you installed the latest development version of the package(s) in question?
If this is a data issue, have you tried clearing your nflverse cache?
This is not a data-related issue.
What version of the package do you have?
0.3.2
Describe the bug
While attempting to use the import_pbp_data function in nfl_data_py, an AttributeError is raised due to the usage of an undefined 'Error' in the exception handling code. This causes the program to fail when trying to catch an exception.
Reprex
import nfl_data_py as nfl
pbp_data = nfl.import_pbp_data(years=[2023])
Expected Behavior
nfl.import_pbp_data should return a dataframe of the data for the year specified.
nflverse_sitrep
Screenshots
No response
Additional context
AttributeError Traceback (most recent call last)
File ~/miniforge3/envs/sports/lib/python3.10/site-packages/nfl_data_py/init.py:140, in import_pbp_data(years, columns, include_participation, downcast, cache, alt_path, thread_requests)
139 try:
--> 140 data = pandas.read_parquet(path, columns=columns if columns else None, engine='auto')
142 raw = pandas.DataFrame(data)
...
--> 153 except Error as e:
154 print(e)
155 print('Data not available for ' + str(year))
NameError: name 'Error' is not defined