Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: =?UTF-8?Q?Nagy_L=c3=a1szl=c3=b3_Zsolt?= Newsgroups: comp.lang.python Subject: pybabel: default locale is None ??? Date: Tue, 17 Nov 2015 09:24:41 +0100 Lines: 23 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de vNfNDbfj1ZZHVTGDyUeXawkdnQXIfueaMZEo2Xnwwl5w== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'win32': 0.03; 'locale': 0.07; 'subject:None': 0.09; 'python': 0.10; '>>>': 0.15; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:default': 0.16; 'attribute': 0.18; 'tells': 0.18; '>>>': 0.20; 'skip:" 40': 0.20; '"",': 0.22; 'sep': 0.22; 'bit': 0.23; 'this:': 0.23; 'import': 0.24; '(most': 0.24; "skip:' 10": 0.28; 'skip:( 20': 0.28; 'environment': 0.29; 'traceback': 0.33; 'file': 0.34; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'skip:& 10': 0.37; 'to:addr:python.org': 0.40; 'default': 0.61; 'charset:iso-8859-2': 0.64; 'why?': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopzeus.com; s=shopzeus_com; t=1447748681; bh=dv0wO8XwwsnfkCrTa1iB1FFFM+S5Q1ucuv2VMUqmCK4=; h=To:From:Subject:Date:From; b=iv6b20WamULrVkIVbaTeqgBJLzRGHlgCsOSsw2T+UNhK+HTtYaG0oSSczJGKmb70M 6VbUc77HDSSm6FcuMTEgBEFFdEJ1UT3rddwBIRSjadVckCOInHNt0H35f7LR+efGBS LD7ZeJyyRlppbm/0grB8/UCmxyAXHa3Z1oBIe6OB8LJn5zf6mdU+N3N2EUwl6VAhgi MKTUwkNR1ENMz+PPHYgRJtM1KhzbDn/VG8vLGNsQMp5lyJTwSXvB2e9tmiAD7v5p1J VSPeQEjGxCtd+CiqYtN8ReHzk2kaKRy/UI2VwsJcGgXiBa9PXmQM1z+kvmEHdwM2K7 qHbEdH+kjK1hw== X-Content-Filtered-By: Mailman/MimeDel 2.1.20+ X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98911 Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32 >>> from datetime import timedelta >>> from babel.dates import format_timedelta >>> td = timedelta(seconds=39.28355172422679) >>> format_timedelta(td) Traceback (most recent call last): File "", line 1, in File "C:\Python35\lib\site-packages\babel\dates.py", line 779, in format_timedelta plural_form = locale.plural_form(value) AttributeError: 'NoneType' object has no attribute 'plural_form' >>> from babel.core import default_locale >>> repr(default_locale('LC_CTIME')) 'None' Why? The default_locale documentation tells this: "Returns the system default locale for a given category, based on environment variables."