-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Unknown attribute: 'hours'.? #165
Comments
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:
|
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 |
In
becomes
|
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'.
The text was updated successfully, but these errors were encountered: