some attributes of Redditor is not defined.
kaif-00z opened this issue · 1 comments
kaif-00z commented
Describe the Bug
some attributes of Redditor is not defined. like .is_gold
, .link_karma
, .comment_karma
and more. https://github.com/praw-dev/asyncpraw/blob/master/asyncpraw/models/reddit/redditor.py#L55
Desired Result
not error!
Relevant Logs
File "/home/Kaif/.local/lib/python3.10/site-packages/asyncpraw/models/reddit/base.py", line 34, in __getattr__
raise AttributeError(
AttributeError: 'Redditor' object has no attribute 'link_karma'. 'Redditor' object has not been fetched, did you forget to execute '.load()'?
Code to reproduce the bug
print((await reddit.user.friends())[0].link_karma)
My code example does not include the Reddit()
initialization to prevent credential leakage.
Yes
This code has previously worked as intended.
No
Operating System/Environment
Ubuntu 20 lts
Python Version
Python3.10.4
Async PRAW Version
7.4.0
Asyncrawcore Version
2.3.0
Anything else?
add that attributes .
kaif-00z commented
oh now i understood , we need to use .load() first