PokeAPI / pokepy

A Python wrapper for PokéAPI

Home Page:https://pokeapi.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with the API

Phoenix0708 opened this issue · comments

i cant get to access the API even when my code is correct

it says list has no attribute weight/height/sprites/name

    async def spawn(self,ctx,poke:int):
        pokemon = pokepy.V2Client()
        pokedata =  pokemon.get_pokemon(poke).weight
        await ctx.send(pokedata)```

@Kronopt Please look into this

Please provide more context.
Did you get an error? If so, what's the stack trace?
Which version of python are you using? And version of pokepy?
Linux? Windows?

Also, I'm a volunteer (as all devs here), so asking nicely for a solution goes a long way to have your problem fixed.

Pokepy is currently on standby. Please check out pokebase

Actually pokepy 0.6 depends on requests 2.21 but beckett depends on requests 2.10 so to resolve this pip was installing the 0.4.2 version of pokepy which returns list but i resolved it with pip install --no-deps pokepy etc thank you and can u give more docs on sprites/official-artwork since i have a problem getting official-artwork pics using pokebase

Checkout the PokeAPI documentation.

To get sprites (I'm assuming pokemon sprites), you probably want to call the Pokemon endpoint and check the sprites fields