Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2011 23:13:53 +1000
From:      Da Rock <freebsd-questions@herveybayaustralia.com.au>
To:        freebsd-questions@freebsd.org
Subject:   Re: LOCALE issue: Pysycache errors on run
Message-ID:  <4EF32D11.4070209@herveybayaustralia.com.au>
In-Reply-To: <4EF2BBF7.60002@herveybayaustralia.com.au>
References:  <4EF2BBF7.60002@herveybayaustralia.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/22/11 15:11, Da Rock wrote:
> Just something for the kids, but I'm wondering how to get this to work?
>
> I've installed from ports, but when I run it from the cli to test it I 
> get an error:
>
> Traceback (most recent call last):
>   File "/usr/local/bin/pysycache.py", line 442, in <module>
>     if __name__ == '__main__': main(const.GWithFullScreen)
>   File "/usr/local/bin/pysycache.py", line 266, in main
>     myrep = os.path.join(const.GRepPysycache, 
> '/usr/local/share/pysycache/help', const.GMyLocale )
>   File "/usr/local/lib/python2.7/posixpath.py", line 66, in join
>     if b.startswith('/'):
> AttributeError: 'NoneType' object has no attribute 'startswith'
>
> Assuming this _does_ actually work, anyone know the trick to getting 
> this work?
After some extensive rooting around, I've discovered through a crash 
course in python and destructive testing that there is a locale issue 
with this program:

%env LANG=en_EN.ISO8859-1 pysycache.py
Traceback (most recent call last):
   File "/usr/local/bin/pysycache.py", line 442, in <module>
     if __name__ == '__main__': main(const.GWithFullScreen)
   File "/usr/local/bin/pysycache.py", line 264, in main
     locale.setlocale(locale.LC_ALL,"")
   File "/usr/local/lib/python2.7/locale.py", line 531, in setlocale
     return _setlocale(category, locale)
locale.Error: unsupported locale setting

Many variations have been tried here, but I still can't get it to work. 
Anything I'm missing here?

Disabling the locale setting in the program is not an option for many 
reasons.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EF32D11.4070209>