Thread subject: sK1 Project :: Failed to run on Slackware 12.2

Posted by Rurik on 12-11-2010 14:19
#1

sK1 was installed from source in the correct order (sk1libs -> sk1sdk -> sk1) by simply invocing ./setup.py install command. Nothing else was touched. Please find an error message below:

Code
~ sk1
Traceback (most recent call last):
  File "/usr/bin/sk1", line 23, in <module>
    sk1_run()
  File "/usr/lib/python2.5/site-packages/sk1/__init__.py", line 19, in sk1_run
    os.environ['LANG'] = lang[0] + lang[1].upper()
IndexError: list index out of range




Any idea what does it mean?

Thanks,

Posted by max on 12-11-2010 14:59
#2

Which locale do you use? Console command locale.

Edited by max on 12-11-2010 16:52

Posted by Rurik on 12-11-2010 22:11
#3

Here is an result of locale command i get.

Code
~ locale
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE=C
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=




Regards,

Posted by max on 12-11-2010 22:25
#4

Try this command

LC_ALL=C sk1

Posted by igor on 13-11-2010 00:08
#5

Rurik wrote:
sK1 was installed from source in the correct order (sk1libs -> sk1sdk -> sk1) by simply invocing ./setup.py install command. Nothing else was touched. Please find an error message below:

Code
~ sk1
Traceback (most recent call last):
  File "/usr/bin/sk1", line 23, in <module>
    sk1_run()
  File "/usr/lib/python2.5/site-packages/sk1/__init__.py", line 19, in sk1_run
    os.environ['LANG'] = lang[0] + lang[1].upper()
IndexError: list index out of range




Any idea what does it mean?

Thanks,



Hi!

Thank you for reported issue. The problem is caused by workaround for Ubuntu. The simplest way is disabling the following code in src/__init__.py:

Code

def sk1_run():
   global LANG
   import sys, os, warnings
   
#   if not os.environ['LANG'] == '':
#      lang = os.environ['LANG'].split('.')
#      LANG = os.environ['LANG']
#      os.environ['LANG'] = lang[0] + lang[1].upper()

      
   warnings.filterwarnings("ignore")
   
   _pkgdir = __path__[0]
   sys.path.insert(1, _pkgdir)
   
   import app
   app.config.sk_command = sys.argv[0]
   app.main.main()





We will improve this implementation in release version to avoid such clashes.

Edited by igor on 13-11-2010 00:09

Posted by Rurik on 13-11-2010 02:17
#6

I have comment out these 4 lines of code, and did a reinstall of the sk1 package. It looks it works fine now.

Thank you Igor!