ramonsaraiva / pubg-python

A python wrapper for the PUBG developer API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pubg_python.exceptions.NotFoundError: The specified resource was not found

Torxed opened this issue · comments

from pubg_python import PUBG, Shard

api_key = "..."
api = PUBG(api_key, Shard.PC_EU)

players = api.players().filter(player_names=['epickitten'])
player = players[0]

The following results in:

Traceback (most recent call last):
  File "pubg.py", line 7, in <module>
    player = players[0]
  File "/usr/lib/python3.7/site-packages/pubg_python-0.4.1-py3.7.egg/pubg_python/decorators.py", line 23, in wrapper
  File "/usr/lib/python3.7/site-packages/pubg_python-0.4.1-py3.7.egg/pubg_python/querysets.py", line 45, in fetch
  File "/usr/lib/python3.7/site-packages/pubg_python-0.4.1-py3.7.egg/pubg_python/clients.py", line 32, in request
pubg_python.exceptions.NotFoundError: The specified resource was not found

And I have no idea why. None of the player-filter searches works.
(python setup.py install from the latest branch. Python3.7 as the errors suggest)

Probably related to their latest API updates. The API is not yet versioned from what I know..

@Torxed I couldn't replicate that:

from pubg_python import PUBG, Shard

api = PUBG('...', Shard.PC_NA)

players = api.players().filter(player_names=['epickitten'])
player = players[0]

print(player.id)
print(player.matches)

>> account.3654e255b77b409e87b10dcb086ab00d
>> [<Match 631af44e-aff6-4f29-99f8-823f75b0c135>, <Match bd3ad8db-aeb0-4dff-b88e-80f285006eeb>, <Match 4bc1b123-2513-4349-a333-8f0dc4b58469>, <Match ee8aa36b-6d3a-4686-8039-307cd4a1d0a0>, <Match eb93b8bf-1793-497b-9e9b-f6003aec07c6>]

You probably requested that data when there was no information available for epickitten, maybe the player has not played recently when you requested it.