Skip to content
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

Same error in Win10 and Linux #143

Open
brakenow opened this issue Aug 16, 2019 · 16 comments
Open

Same error in Win10 and Linux #143

brakenow opened this issue Aug 16, 2019 · 16 comments

Comments

@brakenow
Copy link

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
Copy link

peioe commented Aug 19, 2019

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

@brakenow
Copy link
Author

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
Copy link

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

@brakenow
Copy link
Author

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
Copy link

clorteau commented Aug 23, 2019

Looking at it a bit more It's actually caused by arrow that was updated; see arrow-py/arrow#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: #142

@brakenow
Copy link
Author

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
Copy link

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

@brakenow
Copy link
Author

brakenow commented Aug 24, 2019

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
Copy link
Author

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
Copy link

peioe commented Aug 27, 2019

Why close the issue ? The install is still broken.

@brakenow brakenow reopened this Aug 27, 2019
@brakenow
Copy link
Author

Right :)

@prasket
Copy link

prasket commented Sep 29, 2019

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
Copy link

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
Copy link

LinuxOnTheDesktop commented Apr 6, 2020

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
Copy link

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
Copy link

ksurl commented Jun 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants