Skip to content

Issue with multiple requests #633

@christophermlight

Description

@christophermlight

I have a lot of code using nba_api that was working as of Feb 12, 2026 that is not working today. I seem to have isolated the issue to making multiple requests within the same python code. The block of code below times out on the second request (error: "urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='stats.nba.com', port=443): Read timed out. (read timeout=30)"). However, commenting out any two of the requests allows the remaining one to run fine.

Does this have something to do with the way that nba_api manages requests and the way NBA.com limits them?

example code:

gameID = '0022500710'

box1 = playbyplayv3.PlayByPlayV3(game_id=gameID)
outputs1 = box1.get_data_frames()[0]
print(outputs1)

box2 = boxscoreadvancedv3.BoxScoreAdvancedV3(game_id=gameID)
outputs2 = box2.get_data_frames()[0]
print(outputs2)

box3 = boxscoretraditionalv3.BoxScoreTraditionalV3(game_id=gameID)
outputs3 = box3.get_data_frames()[0]
print(outputs3)

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