Open extremelybadsoraka opened 3 years ago
If you apply that it should work.
Alternatively:
1 diff --git a/shreddit/shredder.py b/shreddit/shredder.py
2 index c4633a0..6a02bf6 100644
3 --- a/shreddit/shredder.py
4 +++ b/shreddit/shredder.py
5 @@ -30,8 +30,8 @@ class Shredder(object):
6 if self._save_directory:
7 self._r.config.store_json_result = True
8
9 - self._recent_cutoff = arrow.now().replace(hours=-self._hours)
10 - self._nuke_cutoff = arrow.now().replace(hours=-self._nuke_hours)
11 + self._recent_cutoff = arrow.now().replace(hour=-self._hours)
12 + self._nuke_cutoff = arrow.now().replace(hour=-self._nuke_hours)
13 if self._save_directory:
14 if not os.path.exists(self._save_directory):
15 os.makedirs(self._save_directory)
(END)
Why doesn't this just get merged?
When this is applied, the error then becomes:
ValueError: hour must be in 0..23
I have the same issue as well. Is there a version I can downgrade to that works?
Downgraded to arrow 0.14.4 and it runs fine now for me, in the meantime.
I can confirm as well, 0.14.3 works fine for me too, thank you.
The solution in #152 worked for me
When this is applied, the error then becomes:
ValueError: hour must be in 0..23
In shredder.py
replace the arrow function "replace" with the arrow function "shift" and everything works as expected.
self._recent_cutoff = arrow.now().replace(hours=-self._hours)
self._nuke_cutoff = arrow.now().replace(hours=-self._nuke_hours)
becomes
self._recent_cutoff = arrow.now().shift(hours=-self._hours)
self._nuke_cutoff = arrow.now().shift(hours=-self._nuke_hours)
I am pretty new to python, but i have been able to follow all steps except at last when I run shreddit, Iget: 'ValueError: Unknown attribute: 'hours'. error.
Here is what happens: INFO:shreddit:Logged in as [redacted] Traceback (most recent call last): File "C:\Users[redacted]\AppData\Local\Programs\Python\Python38-32\Scripts\shreddit-script.py", line 11, in
load_entry_point('shreddit==6.0.7', 'console_scripts', 'shreddit')()
File "c:\users[redacted]\appdata\local\programs\python\python38-32\lib\site-packages\shreddit\app.py", line 44, in main
shredder = Shredder(default_config, args.user)
File "c:\users[redacted]\appdata\local\programs\python\python38-32\lib\site-packages\shreddit\shredder.py", line 33, in init
self._recent_cutoff = arrow.now().replace(hours=-self._hours)
File "c:\users[redacted]\appdata\local\programs\python\python38-32\lib\site-packages\arrow\arrow.py", line 949, in replace
raise ValueError(f"Unknown attribute: {key!r}.")
ValueError: Unknown attribute: 'hours'.