We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ms.get_game_pbp('400915255')
ValueError Traceback (most recent call last) Input In [24], in <cell line: 1>() ----> 1 s.get_game_pbp(400915255) File ~/Documents/Projects/CBBpy/testing/espn/mens/scrape.py:245, in get_game_pbp(game_id) 241 else: 242 # no exception thrown 243 break --> 245 return pd.concat(pbp_halves) File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/util/_decorators.py:311, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs) 305 if len(args) > num_allow_args: 306 warnings.warn( 307 msg.format(arguments=arguments), 308 FutureWarning, 309 stacklevel=stacklevel, 310 ) --> 311 return func(*args, **kwargs) File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/reshape/concat.py:347, in concat(objs, axis, join, ignore_index, keys, levels, names, verify_integrity, sort, copy) 143 @deprecate_nonkeyword_arguments(version=None, allowed_args=["objs"]) 144 def concat( 145 objs: Iterable[NDFrame] | Mapping[Hashable, NDFrame], (...) 154 copy: bool = True, 155 ) -> DataFrame | Series: 156 """ 157 Concatenate pandas objects along a particular axis with optional set logic 158 along the other axes. (...) 345 ValueError: Indexes have overlapping values: ['a'] 346 """ --> 347 op = _Concatenator( 348 objs, 349 axis=axis, 350 ignore_index=ignore_index, 351 join=join, 352 keys=keys, 353 levels=levels, 354 names=names, 355 verify_integrity=verify_integrity, 356 copy=copy, 357 sort=sort, 358 ) 360 return op.get_result() File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/pandas/core/reshape/concat.py:404, in _Concatenator.__init__(self, objs, axis, join, keys, levels, names, ignore_index, verify_integrity, copy, sort) 401 objs = list(objs) 403 if len(objs) == 0: --> 404 raise ValueError("No objects to concatenate") 406 if keys is None: 407 objs = list(com.not_none(*objs)) ValueError: No objects to concatenate
KeyError('src') is thrown in _clean_pbp_table line 751-2: links = [row.find("img")["src"] if row.find("img") else None for row in body_rows]
_clean_pbp_table
links = [row.find("img")["src"] if row.find("img") else None for row in body_rows]
The text was updated successfully, but these errors were encountered:
fix for #11
d8d316c
more robust way of mapping plays to teams in PBP
Also unexpected behavior - for PBPs with video replays, an extra column ('unnamed: 4') is being added
Sorry, something went wrong.
Update for #11
c8ca836
Fix for games with video replays in PBP, extra column no longer added to dataframes
Fixed with d8d316c and c8ca836
dcstats
No branches or pull requests
Code
ms.get_game_pbp('400915255')
Traceback
Cause
KeyError('src') is thrown in
_clean_pbp_table
line 751-2:links = [row.find("img")["src"] if row.find("img") else None for row in body_rows]
The text was updated successfully, but these errors were encountered: