Skip to content

client.play_by_play failing with ValueError: time data 'Time' does not match format '%M:%S.%f' #229

@germannp

Description

@germannp

Hello,

I am running into this ValueError: time data 'Time' does not match format '%M:%S.%f' error with client.play_by_play:

Traceback (most recent call last):
...
    client.play_by_play(
  File "...\basketball_reference_web_scraper\client.py", line 220, in play_by_play
    values = http_service.play_by_play(home_team=home_team, day=day, month=month, year=year)
  File "...\basketball_reference_web_scraper\http_service.py", line 104, in play_by_play
    return self.parser.parse_play_by_plays(
  File "...\basketball_reference_web_scraper\parser_service.py", line 92, in parse_play_by_plays
    return self.play_by_plays_parser.parse(
  File "...\basketball_reference_web_scraper\parsers.py", line 541, in parse
    result.append(self.format_data(
  File "...\basketball_reference_web_scraper\parsers.py", line 553, in format_data
    "remaining_seconds_in_period": self.period_timestamp_parser.to_seconds(timestamp=play_by_play.timestamp),
  File "...\basketball_reference_web_scraper\parsers.py", line 157, in to_seconds
    dt = datetime.strptime(timestamp, self.timestamp_format)
  File "C:\ProgramData\Anaconda3\lib\_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "C:\ProgramData\Anaconda3\lib\_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data 'Time' does not match format '%M:%S.%f'

Any ideas?

I assume this started around February 17th, however it won't work with previous dates neither.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions