EthanC / CallofDuty.py

Asynchronous, object-oriented Python wrapper for the Call of Duty API.
MIT License
91 stars 24 forks source link

Not working GetPlayerMatches for Warzone mode #56

Closed gianluca2414 closed 3 years ago

gianluca2414 commented 3 years ago

Summary

Function GetPlayerMatches not working if the mode is Mode.Warzone

Checklist

Example of the code i tried

myCodID = 'gianluca2414#5528619'

client = await callofduty.Login("emailActivison", "PASSWORD")

match = (await client.GetPlayerMatches(Platform.Activision, myCodID, Title.ModernWarfare, Mode.Warzone, limit=1))[0]
teams = await match.teams()
print(teams)

Traceback

Traceback (most recent call last): File "Test.py", line 30, in asyncio.get_event_loop().run_until_complete(main()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "Test.py", line 20, in main match = (await client.GetPlayerMatches(Platform.Activision, "Yeah#8649242", Title.ModernWarfare, Mode.MultiPlayer, limit=3))[0] File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/enum.py", line 341, in getattr raise AttributeError(name) from None AttributeError: MultiPlayer GIALLU:python3 Test.py [[, , , , ]] GIALLU:clear

GIALLU:python3 Test.py Traceback (most recent call last): File "Test.py", line 30, in asyncio.get_event_loop().run_until_complete(main()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "Test.py", line 21, in main teams = await match.teams() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/callofduty/match.py", line 46, in teams return await self._client.GetMatchTeams(self.title, self.platform, self.id) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/callofduty/client.py", line 827, in GetMatchTeams data: dict = (await self.http.GetMatch(title.value, platform.value, matchId))[ File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/callofduty/http.py", line 263, in GetMatch return await self.Send( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/callofduty/http.py", line 127, in Send raise HTTPException(res.status_code, data) callofduty.errors.HTTPException: HTTP 500 - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Call of Duty® - Unexpected Error
sardylan commented 3 years ago

Same error for me, returns status code 500.

EthanC commented 3 years ago

See client.GetFullMatch() in v1.2.2.