Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access any gen 9 information #46

Closed
jemarq04 opened this issue Aug 23, 2023 · 1 comment
Closed

Can't access any gen 9 information #46

jemarq04 opened this issue Aug 23, 2023 · 1 comment

Comments

@jemarq04
Copy link

jemarq04 commented Aug 23, 2023

I can see all the information on the API itself, but for whatever reason when I try to access it with pokebase it doesn't seem to work. I've given an example below.

Python 3.11.4 (main, Jun 20 2023, 16:59:59) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pokebase as pb
>>> pb.generation(3).main_region.name
'hoenn'
>>> pb.generation(9).main_region.name
>>> 
>>> pb.pokemon("pikachu").height
4
>>> pb.pokemon("fuecoco").height
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.11/site-packages/pokebase/interface.py", line 117, in __getattr__
    raise AttributeError('{} object has no attribute {}'
AttributeError: <class 'pokebase.interface.APIResource'> object has no attribute height

However, I can find those pages in the API itself just fine. There is one for generation 9 (https://pokeapi.co/api/v2/generation/9/) and one for fuecoco (https://pokeapi.co/api/v2/pokemon/909/). Is there a reason I'm not able to access these resources? I've tried uninstalling and reinstalling pokebase.

Edit: It seems that pokemon introduces in Legends Arceus are also not present, as seen in another issue #40 .

@jemarq04
Copy link
Author

Ah, it seems to be because of the cache! I removed the cache found at ~/.cache/pokebase/ and found that now all the new information is able to be accessed without issue! If your cache is not there, you can find it by running

>>> from pokebase import cache
>>> cache.API_CACHE

in the python CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant