voussoir / timesearch

The subreddit archiver
BSD 3-Clause "New" or "Revised" License
171 stars 7 forks source link

insert_filler missing 1 required positional argument #12

Closed dreams-and-thoughts closed 2 years ago

dreams-and-thoughts commented 2 years ago

First time user here, so I might be making a simple mistake, looks like a great utility, can't wait to get it up and running.

I get the following error when running 'get_submissions' command:

timesearch-master/timesearch_modules/tsdb.py", line 420, in insert_submission
    (qmarks, bindings) = sqlhelpers.insert_filler(postdata)
TypeError: insert_filler() missing 1 required positional argument: 'values'

The function in question from sqlhelpers.py:

def insert_filler(column_names, values, require_all=True):

And the calling line from tsdb.py > insert_submission

(qmarks, bindings) = sqlhelpers.insert_filler(postdata)
voussoir commented 2 years ago

Hi, sorry about that. You did not make a mistake. I made some changes to my sqlhelpers module and I had not yet published the update to pypi.

Could you try pip install voussoirkit --upgrade or python -m pip install voussoirkit --upgrade? You should get v0.0.74 now.

Sorry for the poor experience. I am surprised that new people are still discovering timesearch!

dreams-and-thoughts commented 2 years ago

Thank you! Perfect. I'll see what I can do from here, should be fun.

You said you're surprised new people are discovering timesearch... is there a better way that you know of for accessing old reddit archives?

I found this mentioned in a DataHoarder thread about accessing banned/old subreddits.

voussoir commented 2 years ago

You're welcome.

The reason I'm surprised is because I've been out of the reddit programming scene for a long time (my install instructions were written for PRAW v4), and I haven't been advertising timesearch anywhere. So either the older datahoarder threads are coming up on top in google results, or people are still sharing timesearch themselves. It's a pleasant surprise that it's still being shared organically by word of mouth.

I think timesearch still works just fine. The main compromise is that it doesn't download submission media like images or videos or anything else, it just records the link. That's part of why this project doesn't need much maintenance. So if you want an all-in-one archiver that downloads media you might look for a different tool, but otherwise I'm not up to date on the reddit archiving community.

voussoir commented 2 years ago

Hi @comfytoday, if everything is working again let's close this issue :)

dreams-and-thoughts commented 2 years ago

hey @voussoir I ran the upgrade, and it that fixed the issue, but now getting this error:

File "/Users/black-mac/Documents/dev/reddit/timesearch-master/timesearch_modules/tsdb.py", line 323, in check_for_edits self.insert_edited(obj, old_text=existing_body) File "/Users/black-mac/Documents/dev/reddit/timesearch-master/timesearch_modules/tsdb.py", line 381, in insert_edited cur.execute(query, bindings) sqlite3.OperationalError: table submission_edits has no column named text

Command:

python timesearch.py get_submissions -r {subreddit}

voussoir commented 2 years ago

Thanks, could you take this opportunity to also git pull in the place where you downloaded timesearch? There are a couple of new commits I made alongside updating voussoirkit. Sorry about that.

dreams-and-thoughts commented 2 years ago

Perfect, thank you. I should have tried that but I'd downloaded the repository manually. Thanks for your help.