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

Not working, but I swear I set it all up right. Would love some help. #146

Open
chronisaurous opened this issue Oct 3, 2019 · 20 comments
Open

Comments

@chronisaurous
Copy link

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:

C:\Users\me>shreddit
INFO:shreddit:Logged in as me.
Traceback (most recent call last):
File "C:\Python374\Scripts\shreddit-script.py", line 11, in
load_entry_point('shreddit==6.0.7', 'console_scripts', 'shreddit')()
File "C:\Python374\lib\site-packages\shreddit\app.py", line 44, in main
shredder = Shredder(default_config, args.user)
File "C:\Python374\lib\site-packages\shreddit\shredder.py", line 33, in init
self._recent_cutoff = arrow.now().replace(hours=-self._hours)
File "C:\Python374\lib\site-packages\arrow\arrow.py", line 603, in replace
raise AttributeError('unknown attribute: "{}"'.format(key))
AttributeError: unknown attribute: "hours"

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

@EthanZeigler
Copy link

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.

@EthanZeigler
Copy link

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

@kedodrill
Copy link

@EthanZeigler Thank you for this, that fork worked perfectly for me.

@hunguscrungus
Copy link

@EthanZeigler How exactly do I install and use that fork? Instructions seem the same as the original one.

@bbladesGH
Copy link

bbladesGH commented Oct 24, 2019

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

  1. install git (apt-get install git)
  2. install appdirs with pip3 (pip3 install appdirs)
  3. install shreddit using @EthanZeigler's command: (pip3 install git+https://github.com/jdbassa/Shreddit)

@bbladesGH
Copy link

@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"

@EthanZeigler
Copy link

@bblades262 It's not installed properly then. Please run the command as I listed it above and leave the output log here.

@bbladesGH
Copy link

@EthanZeigler thanks for the reply! see below:

Traceback (most recent call last):
File "/home/localuser/.local/bin/shreddit", line 11, in
load_entry_point('shreddit==6.0.7', 'console_scripts', 'shreddit')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2324, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2330, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/home/localuser/.local/lib/python3.6/site-packages/shreddit/app.py", line 8, in
from appdirs import user_config_dir
ModuleNotFoundError: No module named 'appdirs'

@EthanZeigler
Copy link

EthanZeigler commented Oct 24, 2019 via email

@bbladesGH
Copy link

bbladesGH commented Oct 24, 2019

Hello again @EthanZeigler !

i saw the typo, i got appdirs to install. its working now! thank you so much!

@KeananFlowerday
Copy link

KeananFlowerday commented Dec 8, 2019

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"

@EthanZeigler
Copy link

EthanZeigler commented Dec 9, 2019 via email

@KeananFlowerday
Copy link

KeananFlowerday commented Dec 9, 2019

i did, but i can do it again

Edit: I fixed it, the pip3 install of your repo needed -- upgrade

@d0t1q
Copy link

d0t1q commented Dec 18, 2019

You can also fix this yourself by locating and editing shredder.py and editing lines 33 and 34 -

Change "replace" to "shift"

@EthanZeigler
Copy link

EthanZeigler commented Dec 26, 2019

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.

@alper
Copy link

alper commented Mar 1, 2020

The fork by @floatingatoll seems to have most stuff in it.

@floatingatoll
Copy link

(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!)

@LinuxOnTheDesktop
Copy link

LinuxOnTheDesktop commented Apr 1, 2020

@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.

@floatingatoll
Copy link

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.

@mikeriedel
Copy link

@floatingatoll I'm curious why you no longer use it? Did you find a better solution?

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