SQL Command failed - Could not decode to UTF-8 column

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
bmdstinky
Newbie
Newbie
Posts: 2
Joined: November 27th, 2012, 3:55 pm

SQL Command failed - Could not decode to UTF-8 column

Post by bmdstinky »

Hi All,
Had some strange behaviour from SAB tonight on my Synology DS212j NAS. It was happily downloading some anime earlier on in the evening but later realised the package wasn't running on the box when I tried to browse to it.

SAB will now no longer download anything, the NZB's it gets from SickBeard are empty and throws a SQL command error:

Code: Select all

2012-11-27 20:22:18,598::INFO::[urlgrabber:211] Unknown error fetching NZB, retry after 2 min https://api.nzbmatrix.com/v1.1/download.php?id=1448376&username=xxxxxxx&apikey=xxxxxxxx&scenename=1
2012-11-27 20:22:18,628::INFO::[__init__:896] Saving data for queue9.sab in /usr/local/sabnzbd/var/admin/queue9.sab
2012-11-27 20:22:21,570::ERROR::[database:111] SQL Command Failed, see log
2012-11-27 20:22:21,572::INFO::[database:113] Traceback: 
Traceback (most recent call last):
  File "/volume1/@appstore/sabnzbd/share/SABnzbd/sabnzbd/database.py", line 104, in execute
    self.c.execute(command, args)
OperationalError: Could not decode to UTF-8 column 'stage_log' with text 'û°„û ·û°¬ù€¡þ €ºñ€€ºû°€€ý°€€û €€û€€€û°€€ø€€ù€€€ù€€ù€€€ø€€€ú€€û €€ø€€€ý €€ø€€€û€€ú€€û €€ý€€ý€€€ù€€ü°€€ø€€€ý€€€ü €€ø€€€ü°€€ù€€ø°€€ó
I can browse to the NZB in the API url without trouble.

Everywhere I go in SAB throws this error

Code: Select all

2012-11-27 20:22:21,570::ERROR::[database:111] SQL Command Failed, see log
2012-11-27 20:22:21,572::INFO::[database:113] Traceback: 
Traceback (most recent call last):
  File "/volume1/@appstore/sabnzbd/share/SABnzbd/sabnzbd/database.py", line 104, in execute
    self.c.execute(command, args)
OperationalError: Could not decode to UTF-8 column 'stage_log' with text 'û°„û ·û°¬ù€¡þ €ºñ€€ºû°€€ý°€€û €€û€€€û°€€ø€€ù€€€ù€€ù€€€ø€€€ú€€û €€ø€€€ý €€ø€€€û€€ú€€û €€ý€€ý€€€ù€€ü°€€ø€€€ý€€€ü €€ø€€€ü°€€ù€€ø°€€ó

This error will occur on every page refresh. There's a big gap in the logs from when I *think* something happened.

Code: Select all

2012-11-27 19:38:56,422::INFO::[postproc:541] Par2 check starting on Sword Art Online 20 720p
2012-11-27 19:38:56,424::INFO::[postproc:556] Running repair on set [HorribleSubs]_Sword_Art_Online_-_20_[720p].mkv
2012-11-27 19:38:56,452::INFO::[newsunpack:1324] Cannot Quick-check missing file [HorribleSubs]_Sword_Art_Online_-_20_[720p].mkv!
2012-11-27 19:38:56,454::INFO::[newsunpack:799] Scanning "/volume1/Nzb/incomplete/Sword Art Online 20 720p/[HorribleSubs]_Sword_Art_Online_-_20_[720p].mkv.par2"
2012-11-27 20:20:09,693::INFO::[SABnzbd:1258] --------------------------------
2012-11-27 20:20:09,695::INFO::[SABnzbd:1259] SABnzbd.py-0.7.5 (rev=f61e7cb1ed2357ed9d7fa53d5647b4c451c1d458)
2012-11-27 20:20:09,697::INFO::[SABnzbd:1271] Platform = posix
2012-11-27 20:20:09,698::INFO::[SABnzbd:1272] Python-version = 2.7.3 (default, Jun 17 2012, 14:48:43) 
[GCC 4.2.1]
2012-11-27 20:20:09,700::INFO::[SABnzbd:1273] Arguments = /usr/local/sabnzbd/share/SABnzbd/SABnzbd.py -f /usr/local/sabnzbd/var/config.ini --pid /usr/local/sabnzbd/var/ -d
I updated Python to 2.7.3-3 earlier tonight and I've just updated SAB to 0.7.6 but the problem remains.

Any ideas on how to fix this?

Thanks,
Brett
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: SQL Command failed - Could not decode to UTF-8 column

Post by shypike »

Possibly the names use characters outside of the Western-European character set.
Currently SABnzbd is not a Unicode-compliant program and will fail to handle those.
You'll have to something about the names.

If despite this, the problem remains even for "normally" named NZBs:
Wipe the complete history (the X at the top right of the History).
If that fails:
Stop SABnzbd and try to find the file "history1.db" and remove it.
Config->Folders will tell you where to look (Under System Folders, Default Base Folder).
You'll need to have "terminal access" through SSH
or through a web-based management console. I don't know what Synology-s have.
bmdstinky
Newbie
Newbie
Posts: 2
Joined: November 27th, 2012, 3:55 pm

Re: SQL Command failed - Could not decode to UTF-8 column

Post by bmdstinky »

Thanks for the reply. I tried renaming the history 1.db file but didn't stop SAB before I did it. Once the file was removed and SAB restarted it all seems fine.

Thanks for your help.

Brett
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: SQL Command failed - Could not decode to UTF-8 column

Post by shypike »

We're working hard on the 0.8.0 release which will have full Unicode support.
Then, these kind of errors (although very rare) should not occur any more.
Post Reply