export-archive-reddit-saved icon indicating copy to clipboard operation
export-archive-reddit-saved copied to clipboard

Failed try/except block

Open PlanckBrain opened this issue 1 year ago • 4 comments

The try/except block on lines 181 to 194:

The try is failing. The except block is being run. Thus "parent_path" and "child_path" are not being defined. The program runs into that runtime error of not being defined on line 196

PlanckBrain avatar Jun 12 '23 11:06 PlanckBrain

The try/except block on lines 181 to 194:

The try is failing. The except block is being run. Thus "parent_path" and "child_path" are not being defined. The program runs into that runtime error of not being defined on line 196

Hello I'm currently running into the same issue as you did. What did you do to fix it?

SoraAndShiroe avatar Jun 17 '23 15:06 SoraAndShiroe

I similarly got: "NameError: name 'parent_path' is not defined"

It seems the default directory is failing, so uncommenting the final line in config.py to set a custom dir can solve this.

Here's all the fixes I needed to get everything working:

  1. Write pip3 instead of pip[3] (I should have guessed this, but I never use pip)
  2. Use the reddit webpage's personal use script and secret for client_id and client_secret respectively
  3. Put single quotation marks on either side of every value in config.py (double would probably work too)
  4. Uncomment the config save path - this isn't a long term solution but it works for now.
  5. Only use absolute path for save folder, so /Users/brian/... worked on my Mac, but ~/... didn't. (if you don't do this, you end up with ~/Redditsaved/~/Redditsaved/... and bugs here currently)
  6. Creating the subs folder in advance, so in terminal I did mkdir ~/Redditsaved/subs

Overall: great looking results! It dumps everything into HTML nicely, but I wish it looked like the original reddit page for scrolling everything in one place. This is useful too, but I want just a 10k line single doc so that searches are easier. I might poke around at fixes for that next.

EDIT: Just went with a simple cat *.html >> _all.html, but makes for an amazing Cmd+F in BBEdit!

BlinksTale avatar Jun 19 '23 19:06 BlinksTale

Thank you so much kind person. hope you have a good day

SoraAndShiroe avatar Jun 20 '23 10:06 SoraAndShiroe

I similarly got: "NameError: name 'parent_path' is not defined"

It seems the default directory is failing, so uncommenting the final line in config.py to set a custom dir can solve this.

Here's all the fixes I needed to get everything working:

1. Write pip3 instead of pip[3] (I should have guessed this, but I never use pip)

2. Use the reddit webpage's `personal use script` and `secret` for `client_id` and `client_secret` respectively

3. Put single quotation marks on either side of every value in config.py (double would probably work too)

4. Uncomment the config save path - this isn't a long term solution but it works for now.

5. Only use absolute path for save folder, so `/Users/brian/...` worked on my Mac, but `~/...` didn't. (if you don't do this, you end up with `~/Redditsaved/~/Redditsaved/...` and bugs here currently)

6. Creating the `subs` folder in advance, so in terminal I did `mkdir ~/Redditsaved/subs`

Overall: great looking results! It dumps everything into HTML nicely, but I wish it looked like the original reddit page for scrolling everything in one place. This is useful too, but I want just a 10k line single doc so that searches are easier. I might poke around at fixes for that next.

EDIT: Just went with a simple cat *.html >> _all.html, but makes for an amazing Cmd+F in BBEdit!

thank you, It worked for me after I used absolute path in savedir in config.py too

lefixx avatar Jul 01 '23 07:07 lefixx