Page 1 of 1

sabnzb SQL help: sabnzbd.log says "sqlite3.OperationalError: no such table: history"

Posted: September 30th, 2024, 5:43 am
by tinbin
hi

need help with this error am getting

ERROR message sabnzb SQL Command Failed,


thanks for any help

Re: sabnzb SQL help

Posted: September 30th, 2024, 8:41 am
by sander
Ha, there you are, in the right forum! Good.

First of all: have you already rebooted your system ...? Do that first.

If the error still exsist:

You have to tell your setup.
And you have to post the full error, which will make clear where your sql database is stored. Post it on https://justpaste.it/ and paste the url here, with spaces on it https: // justpaste . it / gnbmh (which is needed as your a new user on this forum)

Re: sabnzb SQL help

Posted: September 30th, 2024, 1:41 pm
by tinbin
yes still getting the error not sure that u want ? i dont have a sql database

sabnzb is working fine... just getting the errors

Image

Re: sabnzb SQL help "SQL Command Failed, see log"

Posted: September 30th, 2024, 1:56 pm
by sander
Your screenshot says "SQL Command Failed, see log", and that log is sabnzbd.log. Which you can find/download via the wrench.

In sabnzbd.log, find "SQL Command Failed, see log", and copy from there and then 20 lines down.


For example:

2024-01-14 14:55:25,111::ERROR::[database:137] SQL Command Failed, see log

2024-01-14 14:55:25,111::INFO::[database:138] SQL: SELECT COUNT(*) FROM history WHERE name LIKE ? AND (category = ?)

2024-01-14 14:55:25,111::INFO::[database:139] Arguments: ['%%', 'tv']

2024-01-14 14:55:25,111::INFO::[database:140] Traceback:

Traceback (most recent call last):

File "/app/sabnzbd/sabnzbd/database.py", line 110, in execute

self.cursor.execute(command, args)

sqlite3.OperationalError: no such table: history

Re: sabnzb SQL help

Posted: October 1st, 2024, 3:48 am
by tinbin
i have the log code its not letting me post it here no links allowed ?

Re: sabnzb SQL help

Posted: October 1st, 2024, 3:48 am
by tinbin
File "sabnzbd\database.py", line 120, in execute
sqlite3.OperationalError: no such table: history
2024-10-01 09:34:39,524::ERROR::[database:146] SQL Command Failed, see log
2024-10-01 09:34:39,525::INFO::[database:147] SQL: SELECT * FROM history WHERE name LIKE ? AND archive IS NULL ORDER BY completed desc LIMIT ?, ?
2024-10-01 09:34:39,525::INFO::[database:148] Arguments: ['%%', 0, 10]
2024-10-01 09:34:39,525::INFO::[database:149] Traceback:
Traceback (most recent call last):
File "sabnzbd\database.py", line 120, in execute
sqlite3.OperationalError: no such table: history
2024-10-01 09:34:43,646::INFO::[notifier:157] Sending notification: Error - SQL Command Failed, see log (type=error, job_cat=None)
2024-10-01 09:34:43,646::ERROR::[database:146] SQL Command Failed, see log
2024-10-01 09:34:43,653::INFO::[database:147] SQL: SELECT COUNT(*) FROM history WHERE name LIKE ? AND archive IS NULL
2024-10-01 09:34:43,653::INFO::[database:148] Arguments: ['%%']
2024-10-01 09:34:43,654::INFO::[database:149] Traceback:
Traceback (most recent call last):
File "sabnzbd\database.py", line 120, in execute
sqlite3.OperationalError: no such table: history
2024-10-01 09:34:43,654::ERROR::[database:146] SQL Command Failed, see log
2024-10-01 09:34:43,654::INFO::[database:147] SQL: SELECT * FROM history WHERE name LIKE ? AND archive IS NULL ORDER BY completed desc LIMIT ?, ?
2024-10-01 09:34:43,655::INFO::[database:148] Arguments: ['%%', 0, 10]
2024-10-01 09:34:43,655::INFO::[database:149] Traceback:
Traceback (most recent call last):
File "sabnzbd\database.py", line 120, in execute
sqlite3.OperationalError: no such table: history
2024-10-01 09:36:15,973::INFO::[notifier:157] Sending notification: Error - SQL Command Failed, see log (type=error, job_cat=None)
2024-10-01 09:36:15,973::ERROR::[database:146] SQL Command Failed, see log
2024-10-01 09:36:15,981::INFO::[database:147] SQL: SELECT COUNT(*) FROM history WHERE name LIKE ? AND archive IS NULL
2024-10-01 09:36:15,981::INFO::[database:148] Arguments: ['%%']
2024-10-01 09:36:15,982::INFO::[database:149] Traceback:
Traceback (most recent call last):
File "sabnzbd\database.py", line 120, in execute
sqlite3.OperationalError: no such table: history
2024-10-01 09:36:15,982::ERROR::[database:146] SQL Command Failed, see log
2024-10-01 09:36:15,983::INFO::[database:147] SQL: SELECT * FROM history WHERE name LIKE ? AND archive IS NULL ORDER BY completed desc LIMIT ?, ?
2024-10-01 09:36:15,983::INFO::[database:148] Arguments: ['%%', 0, 1000000]
2024-10-01 09:36:15,983::INFO::[database:149] Traceback:
Traceback (most recent call last):
File "sabnzbd\database.py", line 120, in execute
sqlite3.OperationalError: no such table: history
2024-10-01 09:36:16,189::INFO::[happyeyeballs:201] Quickest IP address for self-test.sabnzbd.org (port=443, IPv4-only): 104.26.2.117 (self-test.sabnzbd.org)
__version__ = 19

Re: sabnzb SQL help

Posted: October 1st, 2024, 4:48 am
by sander
"sqlite3.OperationalError: no such table: history"

That's bad.


Stop SABnzbd.
Then, as you're on Windows, go to directory:

%userprofile%\AppData\Local\sabnzbd\admin

In that directory, find history1.db and rename it to BLABLA_old_history1.db

Then start SABnzbd.

Re: sabnzb SQL help

Posted: October 1st, 2024, 6:10 am
by tinbin
wow thats sorted it
big thanks

cheers tinbin

Re: sabnzb SQL help

Posted: October 1st, 2024, 6:23 am
by sander
Cool.

Explanation: your history1.db was corrupt. That is a bad sign.

Re: sabnzb SQL help: sabnzbd.log says "sqlite3.OperationalError: no such table: history"

Posted: October 1st, 2024, 6:30 am
by tinbin
how does that happen ?

Re: sabnzb SQL help: sabnzbd.log says "sqlite3.OperationalError: no such table: history"

Posted: October 1st, 2024, 6:36 am
by sander
No idea. Bad disk? Virusscanner? Accessed via editor / other program and then saved? ... ?

Re: sabnzb SQL help: sabnzbd.log says "sqlite3.OperationalError: no such table: history"

Posted: October 1st, 2024, 6:38 am
by tinbin
Ok cheers