lurkbbs / e621dl

The automated download script for e621.net. Originally by @wwyaiykycnf.
11 stars 3 forks source link

sqlite3.DatabaseError: database disk image is malformed #40

Closed jahkyah closed 4 years ago

jahkyah commented 4 years ago

Hi!

Hope you are doing well!

I am getting this error when (to what I believe) halfway through my config.ini file it throws this exception.

I do not think it is an issue with the config.ini file as it successfully verifies it and starts downloading.

Only when it gets half-way done downloading from the config.ini file it throws this exception.

image

Exception during download: Traceback (most recent call last): File ".\e621dl.py", line 771, in process_config pathes_storage.add_pathes(directories, filename) File "H:\e621dl_lib\local.py", line 338, in add_pathes self.cur.execute('INSERT OR REPLACE INTO new_files VALUES (?);', (filepath,)) sqlite3.DatabaseError: database disk image is malformed PS H:>

When I run the program again it throws a blank exception so I cannot tell exactly what exception it is throwing.

image

If I had to guess it could be the same exception being thrown as above.

I am going to try to run this script on a separate HDD to see if this issue still persists as I am not sure if it would an issue with my hardware, script or on E621's side of things.

Below is the same exception but on another HDD

image

Exception during download: Traceback (most recent call last): File ".\e621dl.py", line 771, in process_config pathes_storage.add_pathes(directories, filename) File "F:\e621dl_lib\local.py", line 338, in add_pathes self.cur.execute('INSERT OR REPLACE INTO new_files VALUES (?);', (filepath,)) sqlite3.DatabaseError: database disk image is malformed PS F:>

Will you be needing my config.ini file?

Thanks!

lurkbbs commented 4 years ago

I'm not sure how this happened, but it looks like database that stores pathes of files that was ever downloaded is broken. Try remove files.db. If you want to save as much as possible, maybe this could help:

Hope this helps

jahkyah commented 4 years ago

Thanks for the tip!

I will go ahead and delete the files.db file and have the script rebuild it!

I will let you know if this solves the issue!

On Fri, Aug 21, 2020, 12:37 PM lurkbbs notifications@github.com wrote:

I'm not sure how this happened, but it looks like database that stores pathes of files that was ever downloaded is broken. Try remove files.db. If you want to save as much as possible, maybe this could help:

Hope this helps

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lurkbbs/e621dl/issues/40#issuecomment-678382603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMWH2VOYGCUUDLEPIJO74ZDSB2PEPANCNFSM4QGKPZPQ .

jahkyah commented 4 years ago

Hi!

I believe deleting the files.db file fixed this issue. I was able to get past the part where it would throw that exception!

I will close this issue and will reopen if it occurs again!