This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I have been using a PRAW Reddit script application instance to get comments and submissions from the movies and science subreddits. I supply my username and password too. I am able to to get them properly from the movies subreddit but not from the science subreddit. The following exception is generated in the science subreddit: prawcore.exceptions.Forbidden: received 403 HTTP response
. However, this only happens for the science subreddit and not movies. My PRAW version is 7.7.0. I tried searching on the internet and tried changing my user agent, but that didn't help.
I checked this file: https://github.com/praw-dev/prawcore/blob/main/prawcore/exceptions.py which states that the Forbidden exception occurs when "authentication is not permitted for the request" but I don't understand how that can happen for science but not movies. Would really appreciate any help. Thanks! Traceback:
ERROR:root:In Block 2
Traceback (most recent call last):
File "/[secret]/Reddit_Data_Collect/science_crawler.py", line 105, in <module>
subm.comments.replace_more(limit=None)
File "/[secret]/.local/lib/python3.9/site-packages/praw/models/reddit/base.py", line 34, in __getattr__
self._fetch()
File "/[secret]/.local/lib/python3.9/site-packages/praw/models/reddit/submission.py", line 622, in _fetch
data = self._fetch_data()
File "/[secret]/.local/lib/python3.9/site-packages/praw/models/reddit/submission.py", line 640, in _fetch_data
return self._reddit.request(method="GET", params=params, path=path)
File "/[secret]/.local/lib/python3.9/site-packages/praw/util/deprecate_args.py", line 43, in wrapped
return func(**dict(zip(_old_args, args)), **kwargs)
File "/[secret]/.local/lib/python3.9/site-packages/praw/reddit.py", line 941, in request
return self._core.request(
File "/[secret]/.local/lib/python3.9/site-packages/prawcore/sessions.py", line 330, in request
return self._request_with_retries(
File "/[secret]/.local/lib/python3.9/site-packages/prawcore/sessions.py", line 266, in _request_with_retries
raise self.STATUS_EXCEPTIONS[response.status_code](response)
prawcore.exceptions.Forbidden: received 403 HTTP response
EDIT: Added traceback
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/redditdev/c...