Closed iElijahxD closed 6 years ago
Pynite doesn’t support 3.5 for now. You can try updating python or wait a day or so while we fix comptablility issues.
He said he can do it, he's gonna open a pr, so I guess we can wait and see
Problem is Fixed.. I'm not sure how to use github i'm kinda new to the site.. but if you want it to work for python3.5
these 2 changes need to be done..
first remove the import
from .utils import API
then go to async def get_player(self, platform, name):
don't use the pulling thing that is new to python use the old method
async def get_player(self, platform, name):
platform = platform.lower()
if platform not in ('xbl', 'psn', 'pc'):
raise ValueError('Incorrect platform passed. Options: xbl, psn, pc')
try:
async with self.session.get('http://api.fortnitetracker.com/v1/profile/{}/{}'.format(platform,name), timeout=self.timeout, headers=self.headers) as resp:
if resp.status == 200:
raw_data = await resp.json()
if raw_data.get('error'):
raise NotFound()
elif 500 > resp.status > 400:
raise Unauthorized()
else:
raise UnknownError()
except asyncio.TimeoutError:
raise NotResponding()
data = Box(raw_data, camel_killer_box=True)
player = Player(data, camel_killer_box=True)
return player
this will fix the problem for python3.5 easily it took me 10mins to figure it out i didn't want to touch the code in the first place since i didn't have permission to do so but SharpBit granted me permission to fix it myself so i did
And 1 more thing some string you guys using have f in the first before the start of the string for example f'bla' just remove the f
yes, and replace with .format(), do that for every single one, then go to https://github.com/cree-py/pynite/pulls to open one
Issue running into