From owner-freebsd-questions@FreeBSD.ORG Thu Dec 22 13:17:03 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C3DA106566C for ; Thu, 22 Dec 2011 13:17:03 +0000 (UTC) (envelope-from freebsd-questions@herveybayaustralia.com.au) Received: from mail.unitedinsong.com.au (mail.unitedinsong.com.au [150.101.178.33]) by mx1.freebsd.org (Postfix) with ESMTP id B69388FC13 for ; Thu, 22 Dec 2011 13:17:02 +0000 (UTC) Received: from laptop1.herveybayaustralia.com.au (laptop1.herveybayaustralia.com.au [192.168.0.179]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.unitedinsong.com.au (Postfix) with ESMTPSA id 5F0C25C26 for ; Thu, 22 Dec 2011 23:29:27 +1000 (EST) Message-ID: <4EF32D11.4070209@herveybayaustralia.com.au> Date: Thu, 22 Dec 2011 23:13:53 +1000 From: Da Rock User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111109 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4EF2BBF7.60002@herveybayaustralia.com.au> In-Reply-To: <4EF2BBF7.60002@herveybayaustralia.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: LOCALE issue: Pysycache errors on run X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 13:17:03 -0000 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 > 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 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.