locale.setlocale error in api.py, running on Drobo FS

Report & discuss bugs found in 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
meokey
Newbie
Newbie
Posts: 8
Joined: March 14th, 2012, 11:34 pm

locale.setlocale error in api.py, running on Drobo FS

Post by meokey »

I'm running sabnzbd on my Drobo FS and it goes great. Only one thing I have to change before it's able to run, for both 0.6.14 and the latest 0.6.15 versions:

I have to change the following lines in sabnzbd/api.py from

Code: Select all

import locale
locale.setlocale(locale.LC_ALL, "")
to

Code: Select all

DIR_LANGUAGE = None
import locale
locale.setlocale(locale.LC_ALL, DIR_LANGUAGE)
otherwise, it throw out an error when I click on Queue section on the web UI while sabnzbd seems still running:
Traceback (most recent call last):
File "/mnt/DroboFS/Shares/DroboApps/SABnzbdPlus/SABnzbd.py", line 65, in <module>
import sabnzbd
File "/mnt/DroboFS/Shares/DroboApps/SABnzbdPlus/sabnzbd/__init__.py", line 85, in <module>
import sabnzbd.api
File "/mnt/DroboFS/Shares/DroboApps/SABnzbdPlus/sabnzbd/api.py", line 29, in <module>
locale.setlocale(locale.LC_ALL, "")
File "/mnt/DroboFS/Shares/DroboApps/python2/lib/python2.7/locale.py", line 531, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
Any comment?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: locale.setlocale error in api.py, running on Drobo FS

Post by shypike »

It's a sign that your Python installation is incomplete.
Your patch is OK, although there might some minor internationalization issues.
The next release will handle this incompatibility.
Post Reply