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

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
tinbin
Newbie
Newbie
Posts: 7
Joined: September 29th, 2024, 4:36 pm

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

Post by tinbin »

hi

need help with this error am getting

ERROR message sabnzb SQL Command Failed,


thanks for any help
User avatar
sander
Release Testers
Release Testers
Posts: 9006
Joined: January 22nd, 2008, 2:22 pm

Re: sabnzb SQL help

Post 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)
tinbin
Newbie
Newbie
Posts: 7
Joined: September 29th, 2024, 4:36 pm

Re: sabnzb SQL help

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 9006
Joined: January 22nd, 2008, 2:22 pm

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

Post 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
tinbin
Newbie
Newbie
Posts: 7
Joined: September 29th, 2024, 4:36 pm

Re: sabnzb SQL help

Post by tinbin »

i have the log code its not letting me post it here no links allowed ?
tinbin
Newbie
Newbie
Posts: 7
Joined: September 29th, 2024, 4:36 pm

Re: sabnzb SQL help

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 9006
Joined: January 22nd, 2008, 2:22 pm

Re: sabnzb SQL help

Post 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.
tinbin
Newbie
Newbie
Posts: 7
Joined: September 29th, 2024, 4:36 pm

Re: sabnzb SQL help

Post by tinbin »

wow thats sorted it
big thanks

cheers tinbin
User avatar
sander
Release Testers
Release Testers
Posts: 9006
Joined: January 22nd, 2008, 2:22 pm

Re: sabnzb SQL help

Post by sander »

Cool.

Explanation: your history1.db was corrupt. That is a bad sign.
tinbin
Newbie
Newbie
Posts: 7
Joined: September 29th, 2024, 4:36 pm

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

Post by tinbin »

how does that happen ?
User avatar
sander
Release Testers
Release Testers
Posts: 9006
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander »

No idea. Bad disk? Virusscanner? Accessed via editor / other program and then saved? ... ?
tinbin
Newbie
Newbie
Posts: 7
Joined: September 29th, 2024, 4:36 pm

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

Post by tinbin »

Ok cheers
Post Reply