player.matches throws Attribute error (AttributeError: 'Player' object has no attribute 'matches')
nikhilbalwani opened this issue · comments
Nikhil Balwani commented
Stanislav Gelman commented
Last game was played over 6 months ago for player BringMeChicken, that is why there is no matches.
PUBG stores matches only for 14 days.
{
"data": [
{
"type": "player",
"id": "account.a9b9c0922fe7440eaf3a5f481f90a89a",
"attributes": {
"shardId": "steam",
"createdAt": "2019-10-02T18:24:21Z",
"updatedAt": "2019-10-02T18:24:21Z",
"patchVersion": "",
"name": "BringMeChicken",
"stats": null,
"titleId": "bluehole-pubg"
},
"relationships": {
"assets": {
"data": []
},
"matches": { ### EMPTY
"data": []
}
},
"links": {
"self": "https://api.playbattlegrounds.com/shards/steam/players/account.a9b9c0922fe7440eaf3a5f481f90a89a",
"schema": ""
}
}
],
"links": {
"self": "https://api.pubg.com/shards/steam/players?filter[playerNames]=BringMeChicken"
},
"meta": {}
}
Peter commented
I'm having a very similar issue, but I have an account with matches...
I'm basically using the sample code from GitHub.
from pubg_python import PUBG, Shard
apiKey = "###"
api = PUBG(apiKey, Shard.XBOX_NA)
player = api.players().get('account.9cf0aa41fda542acadfcffe6ca91bfa8')
for match in player.matches:
match_data = api.matches().get(match.id)
And I'm getting this error:
Traceback (most recent call last):
File "d:\Personal\PUBG\python\package_test.py", line 9, in <module>
for match in player.matches:
AttributeError: 'Player' object has no attribute 'matches'
Any suggestions on what going on?