Skip to content

[Bug]: dunkscoreleaders cannot perse response #597

@poteto0

Description

@poteto0

NBA API Version

v1.11.3

Issue

Python Version

3.14

Summary

dunkscoreleaders cannot parse response

Code

sample code

result = dunkscoreleaders.DunkScoreLeaders(
        season="2025-26",
)
print(result.get_dict())

error

Traceback (most recent call last):
  File "<path>/main.py", line 19, in <module>
    main()
    ~~~~^^
  File "<path>/main.py", line 6, in main
    result = dunkscoreleaders.DunkScoreLeaders(
        season="2025-26",
    )
  File "<path>/.venv/lib/python3.14/site-packages/nba_api/stats/endpoints/dunkscoreleaders.py", line 117, in __init__
    self.get_request()
    ~~~~~~~~~~~~~~~~^^
  File "<path>/.venv/lib/python3.14/site-packages/nba_api/stats/endpoints/dunkscoreleaders.py", line 133, in get_request
    self.load_response()
    ~~~~~~~~~~~~~~~~~~^^
  File "<path>/.venv/lib/python3.14/site-packages/nba_api/stats/endpoints/dunkscoreleaders.py", line 143, in load_response
    data_sets = self.nba_response.get_data_sets()
  File "<path>/.venv/lib/python3.14/site-packages/nba_api/stats/library/http.py", line 104, in get_data_sets
    results = raw_dict["resultSet"]
              ~~~~~~~~^^^^^^^^^^^^^
KeyError: 'resultSet'

smaple json of response.
It doesn't have "resultSet" or "resultSets".
And maybe "Dunks" -> "dunks"

{
  "params": {
    "leagueId": "00",
    "seasonType": "Regular Season",
    "seasonYear": "2025-26",
    "playerId": 1630168,
    "teamId": 1610612737,
    "gameId": null
  },
  "dunks": [
    {
      "gameId": "0022500101",
      "gameDate": "10/25/2025 12:00:00 AM",
      "matchup": "OKC @ ATL",
      "period": 1,
      "gameClockTime": "11:06",
      "eventNum": 13,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 117.8,
      "jumpSubscore": 82.6,
      "powerSubscore": 96.8,
      "styleSubscore": 69.1,
      "defensiveContestSubscore": 87.3,
      "maxBallHeight": 10.9,
      "ballSpeedThroughRim": 28.772,
      "playerVertical": 32.338,
      "hangTime": 0.483,
      "takeoffDistance": 6.494,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": false,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 33.819,
      "playerLateralSpeed": 4.321,
      "ballDistanceTraveled": 2.13,
      "ballReachBack": 1.072,
      "totalBallAcceleration": 1.335,
      "dunkingHand": "right",
      "jumpingFoot": "both",
      "passLength": 0.0,
      "catchingHand": "",
      "catchDistance": 0.0,
      "lateralCatchDistance": 0.0,
      "passerId": 0,
      "passerName": "",
      "passerFirstName": "",
      "passerLastName": "",
      "passReleasePoint": "",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 73.816,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500090",
      "gameDate": "10/24/2025 12:00:00 AM",
      "matchup": "ATL @ ORL",
      "period": 3,
      "gameClockTime": "10:42",
      "eventNum": 408,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 63.1,
      "jumpSubscore": 53.4,
      "powerSubscore": 42.9,
      "styleSubscore": 27.5,
      "defensiveContestSubscore": 49.8,
      "maxBallHeight": 10.659,
      "ballSpeedThroughRim": 22.009,
      "playerVertical": 26.741,
      "hangTime": 0.416,
      "takeoffDistance": 4.94,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": false,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 33.881,
      "playerLateralSpeed": 4.536,
      "ballDistanceTraveled": 1.814,
      "ballReachBack": 0.0,
      "totalBallAcceleration": 0.556,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 0.0,
      "catchingHand": "",
      "catchDistance": 0.0,
      "lateralCatchDistance": 0.0,
      "passerId": 0,
      "passerName": "",
      "passerFirstName": "",
      "passerLastName": "",
      "passReleasePoint": "",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 53.863,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500101",
      "gameDate": "10/25/2025 12:00:00 AM",
      "matchup": "OKC @ ATL",
      "period": 3,
      "gameClockTime": "7:37",
      "eventNum": 398,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 46.7,
      "jumpSubscore": 41.1,
      "powerSubscore": 53.7,
      "styleSubscore": 79.3,
      "defensiveContestSubscore": 0.0,
      "maxBallHeight": 10.601,
      "ballSpeedThroughRim": 10.865,
      "playerVertical": 25.434,
      "hangTime": 0.483,
      "takeoffDistance": 1.771,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": true,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 14.612,
      "playerLateralSpeed": 1.172,
      "ballDistanceTraveled": 1.977,
      "ballReachBack": 1.977,
      "totalBallAcceleration": 0.071,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 15.805,
      "catchingHand": "both",
      "catchDistance": 1.863,
      "lateralCatchDistance": 1.863,
      "passerId": 1629027,
      "passerName": "Trae Young",
      "passerFirstName": "Trae",
      "passerLastName": "Young",
      "passReleasePoint": "-350.838,115.86,85.957",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 0.0,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500239",
      "gameDate": "11/16/2025 12:00:00 AM",
      "matchup": "ATL @ PHX",
      "period": 4,
      "gameClockTime": "1:16",
      "eventNum": 684,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 46.0,
      "jumpSubscore": 68.5,
      "powerSubscore": 17.3,
      "styleSubscore": 32.5,
      "defensiveContestSubscore": 4.6,
      "maxBallHeight": 11.128,
      "ballSpeedThroughRim": 12.386,
      "playerVertical": 30.59,
      "hangTime": 0.516,
      "takeoffDistance": 3.216,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": true,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 7.763,
      "playerLateralSpeed": 3.288,
      "ballDistanceTraveled": 0.0,
      "ballReachBack": 0.0,
      "totalBallAcceleration": 0.191,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 13.578,
      "catchingHand": "both",
      "catchDistance": 2.193,
      "lateralCatchDistance": 1.891,
      "passerId": 1630700,
      "passerName": "Dyson Daniels",
      "passerFirstName": "Dyson",
      "passerLastName": "Daniels",
      "passReleasePoint": "-340.271,26.746,82.963",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 5.045,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500227",
      "gameDate": "11/13/2025 12:00:00 AM",
      "matchup": "ATL @ UTA",
      "period": 3,
      "gameClockTime": "11:48",
      "eventNum": 373,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 44.0,
      "jumpSubscore": 49.7,
      "powerSubscore": 47.9,
      "styleSubscore": 58.9,
      "defensiveContestSubscore": 0.5,
      "maxBallHeight": 10.561,
      "ballSpeedThroughRim": 18.068,
      "playerVertical": 27.454,
      "hangTime": 0.35,
      "takeoffDistance": 4.714,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": false,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 15.539,
      "playerLateralSpeed": 5.87,
      "ballDistanceTraveled": 1.709,
      "ballReachBack": 0.84,
      "totalBallAcceleration": 0.0,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 0.0,
      "catchingHand": "",
      "catchDistance": 0.0,
      "lateralCatchDistance": 0.0,
      "passerId": 0,
      "passerName": "",
      "passerFirstName": "",
      "passerLastName": "",
      "passReleasePoint": "",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 0.54,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500166",
      "gameDate": "11/4/2025 12:00:00 AM",
      "matchup": "ORL @ ATL",
      "period": 3,
      "gameClockTime": "4:33",
      "eventNum": 485,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 37.4,
      "jumpSubscore": 61.0,
      "powerSubscore": 14.3,
      "styleSubscore": 23.9,
      "defensiveContestSubscore": 0.0,
      "maxBallHeight": 10.622,
      "ballSpeedThroughRim": 13.105,
      "playerVertical": 29.253,
      "hangTime": 0.417,
      "takeoffDistance": 5.185,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": false,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 24.354,
      "playerLateralSpeed": 3.666,
      "ballDistanceTraveled": 1.225,
      "ballReachBack": 0.0,
      "totalBallAcceleration": 0.095,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 0.0,
      "catchingHand": "",
      "catchDistance": 0.0,
      "lateralCatchDistance": 0.0,
      "passerId": 0,
      "passerName": "",
      "passerFirstName": "",
      "passerLastName": "",
      "passReleasePoint": "",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 0.0,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500227",
      "gameDate": "11/13/2025 12:00:00 AM",
      "matchup": "ATL @ UTA",
      "period": 4,
      "gameClockTime": "5:08",
      "eventNum": 664,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 37.4,
      "jumpSubscore": 53.0,
      "powerSubscore": 14.0,
      "styleSubscore": 33.3,
      "defensiveContestSubscore": 0.0,
      "maxBallHeight": 10.826,
      "ballSpeedThroughRim": 13.513,
      "playerVertical": 27.428,
      "hangTime": 0.467,
      "takeoffDistance": 2.283,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": true,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 6.535,
      "playerLateralSpeed": 2.066,
      "ballDistanceTraveled": 0.0,
      "ballReachBack": 0.0,
      "totalBallAcceleration": 0.076,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 12.932,
      "catchingHand": "both",
      "catchDistance": 2.81,
      "lateralCatchDistance": 2.804,
      "passerId": 1630552,
      "passerName": "Jalen Johnson",
      "passerFirstName": "Jalen",
      "passerLastName": "Johnson",
      "passReleasePoint": "-358.792,62.131,99.339",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 0.0,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500090",
      "gameDate": "10/24/2025 12:00:00 AM",
      "matchup": "ATL @ ORL",
      "period": 3,
      "gameClockTime": "8:29",
      "eventNum": 428,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 32.1,
      "jumpSubscore": 38.1,
      "powerSubscore": 13.2,
      "styleSubscore": 34.2,
      "defensiveContestSubscore": 4.5,
      "maxBallHeight": 10.616,
      "ballSpeedThroughRim": 12.234,
      "playerVertical": 23.0,
      "hangTime": 0.45,
      "takeoffDistance": 4.231,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": true,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 58.421,
      "playerLateralSpeed": 6.043,
      "ballDistanceTraveled": 0.0,
      "ballReachBack": 0.0,
      "totalBallAcceleration": 0.077,
      "dunkingHand": "both",
      "jumpingFoot": "left",
      "passLength": 16.285,
      "catchingHand": "both",
      "catchDistance": 2.278,
      "lateralCatchDistance": 2.268,
      "passerId": 1629027,
      "passerName": "Trae Young",
      "passerFirstName": "Trae",
      "passerLastName": "Young",
      "passReleasePoint": "306.349,17.356,92.668",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 4.916,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500130",
      "gameDate": "10/29/2025 12:00:00 AM",
      "matchup": "ATL @ BKN",
      "period": 1,
      "gameClockTime": "5:41",
      "eventNum": 94,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 25.6,
      "jumpSubscore": 35.0,
      "powerSubscore": 13.0,
      "styleSubscore": 24.0,
      "defensiveContestSubscore": 0.0,
      "maxBallHeight": 10.476,
      "ballSpeedThroughRim": 12.939,
      "playerVertical": 25.949,
      "hangTime": 0.317,
      "takeoffDistance": 1.974,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": false,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 8.362,
      "playerLateralSpeed": 2.901,
      "ballDistanceTraveled": 1.252,
      "ballReachBack": 0.0,
      "totalBallAcceleration": 0.056,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 0.0,
      "catchingHand": "",
      "catchDistance": 0.0,
      "lateralCatchDistance": 0.0,
      "passerId": 0,
      "passerName": "",
      "passerFirstName": "",
      "passerLastName": "",
      "passReleasePoint": "",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 0.0,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500130",
      "gameDate": "10/29/2025 12:00:00 AM",
      "matchup": "ATL @ BKN",
      "period": 4,
      "gameClockTime": "9:35",
      "eventNum": 575,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 25.5,
      "jumpSubscore": 34.2,
      "powerSubscore": 14.4,
      "styleSubscore": 23.9,
      "defensiveContestSubscore": 0.0,
      "maxBallHeight": 10.513,
      "ballSpeedThroughRim": 14.016,
      "playerVertical": 24.828,
      "hangTime": 0.333,
      "takeoffDistance": 3.256,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": false,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 46.284,
      "playerLateralSpeed": 4.401,
      "ballDistanceTraveled": 1.228,
      "ballReachBack": 0.0,
      "totalBallAcceleration": 0.075,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 0.0,
      "catchingHand": "",
      "catchDistance": 0.0,
      "lateralCatchDistance": 0.0,
      "passerId": 0,
      "passerName": "",
      "passerFirstName": "",
      "passerLastName": "",
      "passReleasePoint": "",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 0.0,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    },
    {
      "gameId": "0022500115",
      "gameDate": "10/27/2025 12:00:00 AM",
      "matchup": "ATL @ CHI",
      "period": 4,
      "gameClockTime": "10:22",
      "eventNum": 561,
      "playerId": 1630168,
      "playerName": "Onyeka Okongwu",
      "firstName": "Onyeka",
      "lastName": "Okongwu",
      "teamId": 1610612737,
      "teamName": "Hawks",
      "teamCity": "Atlanta",
      "teamAbbreviation": "ATL",
      "dunkScore": 24.2,
      "jumpSubscore": 33.1,
      "powerSubscore": 10.3,
      "styleSubscore": 23.8,
      "defensiveContestSubscore": 0.4,
      "maxBallHeight": 10.445,
      "ballSpeedThroughRim": 9.668,
      "playerVertical": 25.043,
      "hangTime": 0.317,
      "takeoffDistance": 3.005,
      "reverseDunk": false,
      "dunk360": false,
      "throughTheLegs": false,
      "alleyOop": false,
      "tipIn": false,
      "selfOop": false,
      "playerRotation": 38.098,
      "playerLateralSpeed": 2.969,
      "ballDistanceTraveled": 1.218,
      "ballReachBack": 0.0,
      "totalBallAcceleration": 0.012,
      "dunkingHand": "both",
      "jumpingFoot": "both",
      "passLength": 0.0,
      "catchingHand": "",
      "catchDistance": 0.0,
      "lateralCatchDistance": 0.0,
      "passerId": 0,
      "passerName": "",
      "passerFirstName": "",
      "passerLastName": "",
      "passReleasePoint": "",
      "shooterId": 0,
      "shooterName": "",
      "shooterFirstName": "",
      "shooterLastName": "",
      "shotReleasePoint": "",
      "shotLength": 0.0,
      "defensiveContestLevel": 0.39,
      "possibleAttemptedCharge": false,
      "videoAvailable": true
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageResearching into a possible bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions