praw-dev / praw

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

Home Page:http://praw.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

subreddit.hot() has no time_filter option

MatteoRaso opened this issue · comments

Describe the Bug

When attempting to use

reddit.subreddit(sub_name).hot(time_filter="week")

I get the following error:

TypeError: ListingGenerator.__init__() got an unexpected keyword argument 'time_filter'

This doesn't happen when I switch hot to top.

Desired Result

The hot method should have a time filter.

Code to reproduce the bug

.subreddit("gaming").hot(time_filter="week")

The Reddit() initialization in my code example does not include the following parameters to prevent credential leakage:

client_secret, password, or refresh_token.

  • Yes

Relevant Logs

: ListingGenerator.__init__() got an unexpected keyword argument 'time_filter'

This code has previously worked as intended.

Not sure, I haven't used this code before.

Operating System/Environment

Linux Mint 21.2

Python Version

3.11.5

PRAW Version

7.7.1

Prawcore Version

2.4.0

Anything else?

No response