Shreddit icon indicating copy to clipboard operation
Shreddit copied to clipboard

Same error in Win10 and Linux

Open brakenow opened this issue 4 years ago • 16 comments

INFO:shreddit:Logged in as somename Traceback (most recent call last): File "C:\Users\X\AppData\Local\Programs\Python\Python37-32\Scripts\shreddit-script.py", line 11, in load_entry_point('shreddit==6.0.7', 'console_scripts', 'shreddit')() File "c:\users\X\appdata\local\programs\python\python37-32\lib\site-packages\shreddit\app.py", line 44, in main shredder = Shredder(default_config, args.user) File "c:\users\X\appdata\local\programs\python\python37-32\lib\site-packages\shreddit\shredder.py", line 33, in init self._recent_cutoff = arrow.now().replace(hours=-self._hours) File "c:\users\X\appdata\local\programs\python\python37-32\lib\site-packages\arrow\arrow.py", line 590, in replace raise AttributeError('unknown attribute: "{}"'.format(key)) AttributeError: unknown attribute: "hours"

brakenow avatar Aug 16 '19 21:08 brakenow

I'm having the same issue on Ubuntu 19.04 (shreddit installed with pip) and armbian.

peioe avatar Aug 19 '19 21:08 peioe

I'm having the same issue on Ubuntu 19.04 (shreddit installed with pip) and armbian.

Wonder if it's Python that cause this. I will try with Slackware which got an old version.

brakenow avatar Aug 23 '19 19:08 brakenow

Same here on Ubuntu 18.04.3, either with python 2.7.15 or 3.6.8.

clorteau avatar Aug 23 '19 21:08 clorteau

Same here on Ubuntu 18.04.3, either with python 2.7.15 or 3.6.8.

Thank you. You replied in the nick of time. Was about to try with Ubuntu 18.04.3. It's weird as it has worked before. A month ago or there about.

brakenow avatar Aug 23 '19 21:08 brakenow

Looking at it a bit more It's actually caused by arrow that was updated; see https://github.com/crsmithdev/arrow/issues/638. Because of this change line 33 of shredder.py needs to use shift() instead of replace().

Meanwhile I could fix it on my system by downgrading arrow to the previous version with: sudo pip3 install arrow==0.14.4

Edit: the fix is actually in a pull request: https://github.com/x89/Shreddit/pull/142

clorteau avatar Aug 23 '19 21:08 clorteau

Did a downgrade, but the same error. Had to use pip and not pip3 though, as in Debian shreddit uses 2.7. I downgraded to Prawn 4 too.

Did it work for you?

brakenow avatar Aug 23 '19 22:08 brakenow

It worked for me but i had installed shreddit with pip in the first place, not with a distro package.

clorteau avatar Aug 23 '19 22:08 clorteau

Thank you! Cannot change to Python 3.7 in Debian sadly, as it depends on 2.7. Have to try in another distro.

Edit: Will try

$ python --version Python 2.7.13 $ echo 'alias python="/usr/bin/python3.7"' >> ~/.bashrc $ . .bashrc $ python --version Python 3.7

Have to log in again, which I will wait with because of a rsync operation.

brakenow avatar Aug 24 '19 19:08 brakenow

Didn't work setting it in my .bashrc, so I changed globally, as I got the message that Python 2.7 has it's EOL in Jan. 2020, in Debian, when I ran 'pip install -r requirements.txt'.

Installed pip3.

Then I sat up virtualenv -p python3 ~/virtualenvironment/shreddit

Installed shreddit with pip, and downgraded, 'pip3 install arrow==0.14.4'. Didn't need sudo in the virtualenviroment.

Now my Reddit account is gone. Thanks clorteau :)

brakenow avatar Aug 25 '19 18:08 brakenow

Why close the issue ? The install is still broken.

peioe avatar Aug 27 '19 13:08 peioe

Right :)

brakenow avatar Aug 27 '19 22:08 brakenow

I just came across this app and installed via pip in a pipenv environment and getting the same errors as others above. This is with Python 3.7.3 on Debian Buster.

EDIT: If I clone the repo and build locally and then run I do not get the errors, only when I was trying to use via pip install -U shreddit

When I cloned locally I setup a pipenv project then installed requirements via pipenv install -r requirements.txt

prasket avatar Sep 29 '19 00:09 prasket

This repo seems abandoned, but there are a few copies (forks) that implemented the change. You can apply it using this command.

pip install git+https://github.com/jdbassa/Shreddit

EthanZeigler avatar Oct 09 '19 00:10 EthanZeigler

There is a Chrome extension. (It's also Firefox - see below.) It unconfigurably overwrites and deletes all comments. Link. I got the extension working in the 'Iridium' Chrome-based browser.

Note that the comments that get deleted are, only, Reddit comments that are not threads one started or comments within threads one started. In short, the comments are not what the author of the extension calls 'posts'. However, there is a beta of the program that deletes 'posts' too. See https://old.reddit.com/r/NukeRedditHistory/comments/cp5b0k/nuke_reddit_history_210_%CE%B2_with_posts_deletion_is/, which, also, contains a link to the source code here on github. I tried the beta and it works (and it gives you the option of deleting 'comments' or 'posts') but the instructions aren't great. For one thing, one needs to create the root directory of the extension once one has unzipped it. Also, the Firefox instructions - for the beta extension works in Firefox too - omit the following. On the Firefox about:debugging page one needs to click 'This Firefox' and then one needs to select the .js file.

The project seems abandoned. Yet, it does work.

LinuxOnTheDesktop avatar Apr 06 '20 13:04 LinuxOnTheDesktop

This repo seems abandoned, but there are a few copies (forks) that implemented the change. You can apply it using this command.

pip install git+https://github.com/jdbassa/Shreddit

Um.. can you explain the steps to install from your fork on Windows? I did a pip uninstall of the original, but not sure how to install from yours. Thanks.

cstrife1 avatar May 28 '20 02:05 cstrife1

This repo seems abandoned, but there are a few copies (forks) that implemented the change. You can apply it using this command. pip install git+https://github.com/jdbassa/Shreddit

Um.. can you explain the steps to install from your fork on Windows? I did a pip uninstall of the original, but not sure how to install from yours. Thanks.

pip install --user git+https://github.com/jdbassa/shreddit

now you can call shreddit from %appdata%\python\python38\Scripts\shreddit.exe (change version number depending on your installed version)

make a script to cd to your config folder and call shreddit with the full path and full config file name.

ksurl avatar Jun 04 '20 03:06 ksurl