Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

SummonerLeague does not have attribute entries. #4

Closed
RubenPeeters opened this issue Jun 30, 2022 · 0 comments
Closed

SummonerLeague does not have attribute entries. #4

RubenPeeters opened this issue Jun 30, 2022 · 0 comments

Comments

@RubenPeeters
Copy link

I am using the SummonerLeague object and trying to get to its entries. I get an error which says that the object does not have an attribute named entries. According to the source code and the documentation however, it does.

Code:

summoner = await lol.Summoner(name=name, platform=region).get()
leagues = summoner.league_entries
print(leagues.entries)

Output:

'SummonerLeague' object has no attribute 'entries'
'SummonerLeague' object has no attribute 'entries'

Code:

print(dir(leagues))
print(vars(leagues))

Output:

['Meta', '__annotations__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_locale', '_meta', '_platform', '_platform2regions', '_platforms', '_region', '_regions', '_version', 'body', 'clean', 'dict', 'fill', 'filter', 'get', 'initialize', 'load', 'load_lazy_properties', 'locale', 'match_rule', 'match_server', 'metapipeline', 'metaroot', 'pipeline', 'platform', 'post', 'post_request', 'pre_request', 'put', 'qualkey', 'query', 'raw', 'rdict', 'region', 'setup', 'summoner', 'summoner_id', 'token', 'transform', 'version']
{'_meta': <pyot.models.lol.league.SummonerLeague.Meta object at 0x0000022B34F52F50>, 'summoner_id': 'CRyYy0X6Eu0mBbqLIZND_IYoixNORDK4kUG18ZdD2QC0EMM', '_platform': 'euw1'}

Both the name and the region are correct, the summoner is also ranked.

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

No branches or pull requests

1 participant