You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed shreddit to my windows PC using pip install -U shreddit in a python 3.9 venv.
I modified the praw ini and shreddit.yml files and am getting this error when I run:
INFO:shreddit:Logged in as <my_username>.
Traceback (most recent call last):
File "<path_to_my_venv>\Scripts\shreddit-script.py", line 33, in <module>
sys.exit(load_entry_point('shreddit==6.0.7', 'console_scripts', 'shreddit')())
File "<path_to_my_venv>\lib\site-packages\shreddit\app.py", line 44, in main
shredder = Shredder(default_config, args.user)
File "<path_to_my_venv>\lib\site-packages\shreddit\shredder.py", line 33, in __init__
self._recent_cutoff = arrow.now().replace(hours=-self._hours)
File "<path_to_my_venv>\lib\site-packages\arrow\arrow.py", line 807, in replace
raise AttributeError('unknown attribute: "{}"'.format(key))
AttributeError: unknown attribute: "hours"
FYI, here is the shreddit yaml I used if needed
---
# How many hours of comments you want to keep
# 24 hours in a day,
# 168 hours in a week,
# 672 hours in two fortnights,
# 720 hours in a month (30 days),
# 8766 hours in a year (365.25 days)
hours: 1
# Max score, higher than this and it'll be kept.
max_score: 9999
# Options: new, top, controversial, more?
sort: new
# Enables print statements to notify you of what's going on
verbose: True
# Removes your vote before deleting the item
clear_vote: True
# Options: comments, submitted, overview
# See: https://github.com/mellort/reddit_api/blob/master/reddit/objects.py#L359
# Overview: both submissions and comments. Comments / Submitted are as expected
item: overview
# Anything in this list won't be deleted, coma delimited
# spaces should work as .strip() is called after splitting
# on comma.
whitelist: [AskScience]
# If you want any specific posts to be whitelisted stick 'em in here
whitelist_ids: []
# If you want to whitelist or blacklist specific multireddits, add them here
# Each one must be a list of 2 elements: username, multireddit
# Example:
# multi_blacklist:
# - [myusername, mymulti]
# - [someotheruser, theirmulti]
multi_blacklist: []
multi_whitelist: []
# If you set this then no editing or deleting will be done
# but the output from the program will be shown as an example
trial_run: True
# Ignore distinguished comments.
whitelist_distinguished: False
# Ignore gilded (gold) comments
whitelist_gilded: False
# Delete everything older that this date, **This ignores whitelists**.
# Can be used as a second deletion, as in "delete items older than 24 hours
# except on whitelisted subreddits but after 3 months delete everything.
nuke_hours: 24
# Save a copy to disk of comments and posts before deleting them.
keep_a_copy: False
save_directory: /tmp
# Replacement text format
# Defines what you want to edit deleted content with pre-deletion (to ensure
# it's not saved in their database).
# Default: Random string. But this can be detected as spam in some cases.
# options: [random, dot, "user entered string"]
replacement_format: "Used a script to delete posts"
# Debug level, how much output you want
# See: https://docs.python.org/3/library/logging.html#logging-levels
debug: DEBUG
# Define your own wordlist to use as substitution text when
# replacement_format == random
wordlist: []
# Batch cooldown
# This controls how long (in seconds) to wait between each set of 1000 deletions.
batch_cooldown: 10
# vim: syntax=yaml ts=2
The text was updated successfully, but these errors were encountered:
I installed shreddit to my windows PC using pip install -U shreddit in a python 3.9 venv.
I modified the praw ini and shreddit.yml files and am getting this error when I run:
FYI, here is the shreddit yaml I used if needed
The text was updated successfully, but these errors were encountered: