shadowmoose / RedditDownloader

Scrapes Reddit to download media of your choice.
1.11k stars 99 forks source link

Hangs on download #33

Closed commander-flatus closed 6 years ago

commander-flatus commented 6 years ago

Well everything was working. I now get the following output on stderr and the program hangs:

Downloading from Source: default-downloader Exception in thread Handler - 3: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 42, in run self.process_ele(item) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 95, in process_ele manifest.insert_post(reddit_element) # Update Manifest with completed ele. File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 101, in insert_post direct_insert_post(ele['id'], ele['author'], ele['source_alias'], ele['subreddit'], ele['title'], ele['type'], ele['files'], ele['parent'], ele['body']) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 90, in direct_insert_post (_id, author, source_alias, subreddit, title, _type, parent, body) sqlite3.OperationalError: table posts has no column named parent

Exception in thread Handler - 5: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 42, in run self.process_ele(item) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 95, in process_ele manifest.insert_post(reddit_element) # Update Manifest with completed ele. File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 101, in insert_post direct_insert_post(ele['id'], ele['author'], ele['source_alias'], ele['subreddit'], ele['title'], ele['type'], ele['files'], ele['parent'], ele['body']) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 90, in direct_insert_post (_id, author, source_alias, subreddit, title, _type, parent, body) sqlite3.OperationalError: table posts has no column named parent

Exception in thread Handler - 4: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 42, in run self.process_ele(item) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 95, in process_ele manifest.insert_post(reddit_element) # Update Manifest with completed ele. File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 101, in insert_post direct_insert_post(ele['id'], ele['author'], ele['source_alias'], ele['subreddit'], ele['title'], ele['type'], ele['files'], ele['parent'], ele['body']) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 90, in direct_insert_post (_id, author, source_alias, subreddit, title, _type, parent, body) sqlite3.OperationalError: table posts has no column named parent

Exception in thread Handler - 1: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 42, in run self.process_ele(item) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 95, in process_ele manifest.insert_post(reddit_element) # Update Manifest with completed ele. File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 101, in insert_post direct_insert_post(ele['id'], ele['author'], ele['source_alias'], ele['subreddit'], ele['title'], ele['type'], ele['files'], ele['parent'], ele['body']) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 90, in direct_insert_post (_id, author, source_alias, subreddit, title, _type, parent, body) sqlite3.OperationalError: table posts has no column named parent

Exception in thread Handler - 2: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 42, in run self.process_ele(item) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/processing/handlerthread.py", line 95, in process_ele manifest.insert_post(reddit_element) # Update Manifest with completed ele. File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 101, in insert_post direct_insert_post(ele['id'], ele['author'], ele['source_alias'], ele['subreddit'], ele['title'], ele['type'], ele['files'], ele['parent'], ele['body']) File "/home/ted/bin/shadowmoose-RedditDownloader-eef45da/classes/util/manifest.py", line 90, in direct_insert_post (_id, author, source_alias, subreddit, title, _type, parent, body) sqlite3.OperationalError: table posts has no column named parent``

shadowmoose commented 6 years ago

It looks like you moved from one of the older test builds into a new one, which expects a different database layout. Anything that isn't an official release build should be used as-is, because different non-release versions will almost certainly not work with each other, or may even be broken outright.

You can fix this by deleting the database (which will cause RMD to forget & re-download the previous posts), by opening the database file in a SQLite editor and adding a text row named parent into the posts table, or by just reverting to running the commit you were using before.

commander-flatus commented 6 years ago

Where is the database file located?

shadowmoose commented 6 years ago

It is created within the base_dir file, the base directory where all downloaded files are stored.