Open chronisaurous opened 5 years ago
Came here for the same issue. I'm guessing this app depends on the arrow API, which made a breaking change in an update last week. I'll see if I can make a pull request to fix it if there isn't one already.
Confirmed fix by pull request #142
This 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 Thank you for this, that fork worked perfectly for me.
@EthanZeigler How exactly do I install and use that fork? Instructions seem the same as the original one.
@hunguscrungus i got the command to work by first installing git (apt-get install git) then i could run the command @EthanZeigler specified. However im still getting an error
This is how i got it to work:
@EthanZeigler I did a manual install from the fork you specified, but im still getting the error:
NFO:shreddit:Logged in as RedditUser. Traceback (most recent call last): File "/home/localuser/.local/bin/shreddit", line 11, in <module> sys.exit(main()) File "/home/localuser/.local/lib/python3.6/site-packages/shreddit/app.py", line 44, in main shredder = Shredder(default_config, args.user) File "/home/localuser/.local/lib/python3.6/site-packages/shreddit/shredder.py", line 33, in __init__ self._recent_cutoff = arrow.now().replace(hours=-self._hours) File "/home/localuser/.local/lib/python3.6/site-packages/arrow/arrow.py", line 603, in replace raise AttributeError('unknown attribute: "{}"'.format(key)) AttributeError: unknown attribute: "hours"
@bblades262 It's not installed properly then. Please run the command as I listed it above and leave the output log here.
@EthanZeigler thanks for the reply! see below:
Traceback (most recent call last):
File "/home/localuser/.local/bin/shreddit", line 11, in
pip3 install appdirs
Hello again @EthanZeigler !
i saw the typo, i got appdirs to install. its working now! thank you so much!
still having the same issues
PS C:\Users\kflow\Desktop\Shreddit-master> pip install git+https://github.com/jdbassa/Shreddit Collecting git+https://github.com/jdbassa/Shreddit Cloning https://github.com/jdbassa/Shreddit to c:\users\kflow\appdata\local\temp\pip-req-build-ei4bp921 Running command git clone -q https://github.com/jdbassa/Shreddit 'C:\Users\kflow\AppData\Local\Temp\pip-req-build-ei4bp921' Requirement already satisfied (use --upgrade to upgrade): shreddit==6.0.7 from git+https://github.com/jdbassa/Shreddit in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages Requirement already satisfied: arrow in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from shreddit==6.0.7) (0.15.4) Requirement already satisfied: backports-abc in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from shreddit==6.0.7) (0.5) Requirement already satisfied: praw>=4 in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from shreddit==6.0.7) (6.4.0) Requirement already satisfied: PyYAML in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from shreddit==6.0.7) (5.2) Requirement already satisfied: requests in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from shreddit==6.0.7) (2.22.0) Requirement already satisfied: six in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from shreddit==6.0.7) (1.13.0) Requirement already satisfied: tornado in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from shreddit==6.0.7) (6.0.3) Requirement already satisfied: python-dateutil in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from arrow->shreddit==6.0.7) (2.8.1) Requirement already satisfied: prawcore<2.0,>=1.0.1 in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from praw>=4->shreddit==6.0.7) (1.0.1) Requirement already satisfied: websocket-client>=0.54.0 in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from praw>=4->shreddit==6.0.7) (0.56.0) Requirement already satisfied: update-checker>=0.16 in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from praw>=4->shreddit==6.0.7) (0.16) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from requests->shreddit==6.0.7) (3.0.4) Requirement already satisfied: certifi>=2017.4.17 in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from requests->shreddit==6.0.7) (2019.11.28) Requirement already satisfied: idna<2.9,>=2.5 in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from requests->shreddit==6.0.7) (2.8) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages (from requests->shreddit==6.0.7) (1.25.7) WARNING: You are using pip version 19.2.3, however version 19.3.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. PS C:\Users\kflow\Desktop\Shreddit-master> shreddit INFO:shreddit:Logged in as me. Traceback (most recent call last): File "C:\Users\kflow\AppData\Local\Programs\Python\Python38\Scripts\shreddit-script.py", line 11, in <module> load_entry_point('shreddit==6.0.7', 'console_scripts', 'shreddit')() File "c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages\shreddit\app.py", line 44, in main shredder = Shredder(default_config, args.user) File "c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages\shreddit\shredder.py", line 33, in __init__ self._recent_cutoff = arrow.now().replace(hours=-self._hours) File "c:\users\kflow\appdata\local\programs\python\python38\lib\site-packages\arrow\arrow.py", line 612, in replace raise AttributeError('unknown attribute: "{}"'.format(key)) AttributeError: unknown attribute: "hours"
It's likely you didn't uninstall the old one first.
i did, but i can do it again
Edit: I fixed it, the pip3 install of your repo needed -- upgrade
You can also fix this yourself by locating and editing shredder.py and editing lines 33 and 34 -
Change "replace" to "shift"
Due to the increased number of people having the same issue, I'm working on creating a fork named Shredditx that can be community maintained since the original author seems to have abandoned it. It will include the fix to this issue.
The fork by @floatingatoll seems to have most stuff in it.
(Hi, I just merged the fixes from all the extant forks into a single one, so that I could use it. I hope it helps others. I'm not actively using it much so it's just as 'abandoned' as the original author's, but it's a better starting point than existed before!)
@floatingatoll
Thanks for creating the new repository. I used it - but perhaps wrongly. (Goodness, python is a pain to setup!) Here is what I did. You will see that I did manage to do the shred. Rather, I got a credentials error.
cd ~/git [obviously, this directory must exist before you do this]
mkdir shreddit
git clone https://github.com/floatingatoll/Shreddit.git
cd Shreddit
pip3 install pipenv
sudo -H python3 setup.py install
shreddit -g
[Here do something to copy old praw.ini file over new one.Then proceed.]
shreddit
[But then I get a 'Bad username or password' error! And the same happens if I use `python3 -m shreddit.app`]
I am on Mint 19.3.
The error I get is described here, in the original shreddit repo, but what is on that page does not help me.
As noted above, I'm not using it actively. If you're able to work it out and fix it in a fork on your own, you are welcome to send me a PR.
@floatingatoll I'm curious why you no longer use it? Did you find a better solution?
Hey guys, I've never used python before and besides a very, VERY basic understanding of code just from following tutorials and stuff over the years, I really don't know what I'm doing. I do want to learn though and that's why I'm asking here instead of just giving up. It's not really important to me to delete my comments as I've deleted any that I really don't want but I'm determined to figure this out for the sake of learning!
https://www.reddit.com/r/privacy/comments/6dcxgs/how_do_i_use_shreddit_answered/
I followed the tutorial this guy made and it seemed that everything went well and I made no mistakes until I finally got to the end, opened up Command Prompt and entered "shreddit". It didn't work and here is what was displayed:
I changed my PC user to "me" and my reddit name to "me" for the sake of privacy but apart from that, that's exactly what was displayed.
I would love some help, let me know if you need any other information :)
Thanks