Così oggi ho aggiornato a 2.0.2 bazar, e ho cominciato a ricevere questo messaggio (io sono su leopardo delle nevi, btw):errore strano locale python. cosa sta succedendo qui esattamente?
bzr: warning: unknown locale: UTF-8
Could not determine what text encoding to use.
This error usually means your Python interpreter
doesn't support the locale set by $LANG (en_US.UTF-8)
Continuing with ascii encoding.
molto strano, dato che il mio LANG è in realtà vuota. Cosa simile accade quando provo ad armeggiare con il modulo locale
Python 2.5.4 (r254:67916, Nov 30 2009, 14:09:22)
[GCC 4.3.4] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/sbo/runtimes/lib/python2.5/locale.py", line 443, in getdefaultlocale
return _parse_localename(localename)
File "/Users/sbo/runtimes/lib/python2.5/locale.py", line 375, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
esportare LANG non aiuta
[email protected]:~ $ export LANG=en_US.UTF-8
[email protected]:~ $ bzr
bzr: warning: unknown locale: UTF-8
Could not determine what text encoding to use.
This error usually means your Python interpreter
doesn't support the locale set by $LANG (en_US.UTF-8)
Continuing with ascii encoding.
Tuttavia, questo ha risolto il problema
[email protected]:~ $ export LANG=en_US.UTF-8
[email protected]:~ $ export LC_ALL=en_US.UTF-8
Python 2.5.4 (r254:67916, Nov 30 2009, 14:09:22)
[GCC 4.3.4] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'UTF8')
Potrebbe spiegare cosa sta succedendo qui, per una migliore googlability?
Ulteriori informazioni sul problema? –
+1 le due righe "export" hanno reso il mio "ValueError: unknown locale: ..." andare via. – Bogatyr
Grazie mille per queste ultime due righe. Mi ha salvato e sono sicuro che molti altri utenti Mac hanno molto tempo. –