ERROR:scrape:"Thu Sep 8 18:00:26 2022" attempt 3: 400915769 - invalid literal for int() with base 10: '--'
Traceback (most recent call last):
File "/Users/dscow/Documents/Projects/CBBpy/testing/espn/mens/scrape.py", line 136, in get_game_boxscore
df_home = _clean_boxscore_table(
File "/Users/dscow/Documents/Projects/CBBpy/testing/espn/mens/scrape.py", line 591, in _clean_boxscore_table
df['min'] = df['min'].astype(int)
File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/generic.py", line 5912, in astype
new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 419, in astype
return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 304, in apply
applied = getattr(b, f)(**kwargs)
File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/internals/blocks.py", line 580, in astype
new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/dtypes/cast.py", line 1292, in astype_array_safe
new_values = astype_array(values, dtype, copy=copy)
File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/dtypes/cast.py", line 1237, in astype_array
values = astype_nansafe(values, dtype, copy=copy)
File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/dtypes/cast.py", line 1154, in astype_nansafe
return lib.astype_intsafe(arr, dtype)
File "pandas/_libs/lib.pyx", line 668, in pandas._libs.lib.astype_intsafe
ValueError: invalid literal for int() with base 10: '--'
Cause
All entries in the minutes played column are '--', so the column can't be cast as an integer
Code
s.get_game_boxscore('400915769')
Traceback
Cause
All entries in the minutes played column are '--', so the column can't be cast as an integer