AttributeError: 'Redditor' object has no attribute 'icon_img'
See original GitHub issueDescribe the Bug
I get an AttributeError while trying to use .icon_img. It had been working fine around a month ago.
Desired Result
I expected to get the URL of the user’s profile picture.
Relevant Logs
AttributeError: 'Redditor' object has no attribute 'icon_img'
Code to reproduce the bug
reddit = praw.Reddit(client_id, client_secret, user_agent)
url = reddit.redditor(username).icon_img
My code example does not include the Reddit()
initialization to prevent credential leakage.
Yes
This code has previously worked as intended.
Yes
Operating System/Environment
Ubuntu 22.04.1 LTS
Python Version
Python 3.10
PRAW Version
7.6.1
Prawcore Version
2.3.0
Anything else?
No response
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
AttributeError: 'Redditor' object has no attribute 'icon_img'
But I am getting AttributeError: 'Redditor' object has no attribute 'icon_img'. I am using PRAW 7.6.1 with Python 3.10.
Read more >Praw Reddit Web Crawler Error "object has no attribute"
In the Praw docs it states that these MoreComments objects are a representation of the load more comments and continue this thread links...
Read more >Redditor — PRAW 7.6.1 documentation
This table describes attributes that typically belong to objects of this class. ... Whether or not the Redditor has active Reddit Premium status....
Read more >Scraping Reddit data - Gilbert Tanner
Scrape data from Reddit using PRAW, the Python wrapper for the Reddit API. ... AttributeError: 'MoreComments' object has no attribute 'body'.
Read more >comment.submission is not loaded or awaitable. #12 - GitHub
'Submission' object has not been fetched, did you forget to execute ... The Redditor object for the .author attribute is still lazily loaded...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is not. It is the nature of working with Reddit’s API.
What I mean by that is for example, in comments, some attributes are returned when you get the comment from a submission vs initializing them directly (which uses a different endpoint when you try and access the attribute).