x89 / Shreddit

Remove your comment history on Reddit as deleting an account does not do so.
Other
998 stars 134 forks source link

Same error in Win10 and Linux #143

Open brakenow opened 5 years ago

brakenow commented 5 years ago

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"

peioe commented 5 years ago

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

brakenow commented 5 years ago

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.

clorteau commented 5 years ago

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

brakenow commented 5 years ago

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.

clorteau commented 5 years ago

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

brakenow commented 5 years ago

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?

clorteau commented 5 years ago

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

brakenow commented 5 years ago

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 commented 5 years ago

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 :)

peioe commented 5 years ago

Why close the issue ? The install is still broken.

brakenow commented 5 years ago

Right :)

prasket commented 5 years ago

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

EthanZeigler commented 4 years ago

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

LinuxOnTheDesktop commented 4 years ago

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.

cstrife1 commented 4 years ago

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.

ksurl commented 4 years ago

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.