View previous topic :: View next topic |
Author |
Message |
jeffk l33t
Joined: 13 Sep 2003 Posts: 671
|
Posted: Thu Dec 01, 2011 4:33 am Post subject: virtualenv-1.7: UnicodeDecodeError can't decode byte 0xc3 |
|
|
On about 4 of 6 Gentoo ~amd64 machines (physical servers, linode servers, and one laptop), I can't emerge virtualenv-1.7. All machines have python 2.7 and 3.2, so I'm not sure what the environment difference would be. I hesitate to file a bug without reproducibility. Any ideas?
Thanks.
Code: | $ eselect python list
Available Python interpreters:
[1] python2.7 *
[2] python3.2 |
Code: | >>> Emerging (1 of 1) dev-python/virtualenv-1.7
>>> Failed to emerge dev-python/virtualenv-1.7, Log file:
>>> '/var/tmp/portage/dev-python/virtualenv-1.7/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.08, 0.12, 0.14
* Package: dev-python/virtualenv-1.7
* Repository: gentoo
* Maintainer: python@gentoo.org
* USE: amd64 elibc_glibc kernel_linux multilib userland_GNU
* FEATURES: sandbox
>>> Unpacking source...
>>> Unpacking virtualenv-1.7.tar.gz to /var/tmp/portage/dev-python/virtualenv-1.7/work
>>> Source unpacked in /var/tmp/portage/dev-python/virtualenv-1.7/work
>>> Preparing source in /var/tmp/portage/dev-python/virtualenv-1.7/work/virtualenv-1.7 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/virtualenv-1.7/work/virtualenv-1.7 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/virtualenv-1.7/work/virtualenv-1.7 ...
* Building of dev-python/virtualenv-1.7 with CPython 2.7...
python2.7 setup.py build -b build-2.7
running build
running build_py
creating build-2.7
creating build-2.7/lib
copying virtualenv.py -> build-2.7/lib
creating build-2.7/lib/virtualenv_support
copying virtualenv_support/__init__.py -> build-2.7/lib/virtualenv_support
copying virtualenv_support/setuptools-0.6c11-py2.7.egg -> build-2.7/lib/virtualenv_support
copying virtualenv_support/pip-1.0.2.tar.gz -> build-2.7/lib/virtualenv_support
copying virtualenv_support/distribute-0.6.24.tar.gz -> build-2.7/lib/virtualenv_support
warning: build_py: byte-compiling is disabled, skipping.
* Building of dev-python/virtualenv-1.7 with CPython 3.2...
python3.2 setup.py build -b build-3.2
Traceback (most recent call last):
File "setup.py", line 23, in <module>
long_description += "\n\n" + f.read()
File "/usr/lib64/python3.2/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 129: ordinal not in range(128)
* ERROR: dev-python/virtualenv-1.7 failed (compile phase):
* Building failed with CPython 3.2 in distutils_building() function
*
* Call stack:
* ebuild.sh, line 84: Called src_compile
* environment, line 3596: Called distutils_src_compile
* environment, line 958: Called python_execute_function 'distutils_building'
* environment, line 1988: Called die
* The specific snippet of code:
* die "${failure_message}";
*
* If you need support, post the output of 'emerge --info =dev-python/virtualenv-1.7',
* the complete build log and the output of 'emerge -pqv =dev-python/virtualenv-1.7'.
* The complete build log is located at '/var/tmp/portage/dev-python/virtualenv-1.7/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-python/virtualenv-1.7/temp/environment'.
* S: '/var/tmp/portage/dev-python/virtualenv-1.7/work/virtualenv-1.7'
* Messages for package dev-python/virtualenv-1.7:
* ERROR: dev-python/virtualenv-1.7 failed (compile phase):
* Building failed with CPython 3.2 in distutils_building() function
*
* Call stack:
* ebuild.sh, line 84: Called src_compile
* environment, line 3596: Called distutils_src_compile
* environment, line 958: Called python_execute_function 'distutils_building'
* environment, line 1988: Called die
* The specific snippet of code:
* die "${failure_message}";
*
* If you need support, post the output of 'emerge --info =dev-python/virtualenv-1.7',
* the complete build log and the output of 'emerge -pqv =dev-python/virtualenv-1.7'.
* The complete build log is located at '/var/tmp/portage/dev-python/virtualenv-1.7/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-python/virtualenv-1.7/temp/environment'.
* S: '/var/tmp/portage/dev-python/virtualenv-1.7/work/virtualenv-1.7' |
|
|
Back to top |
|
|
FuzzyRay Retired Dev
Joined: 02 Oct 2003 Posts: 79
|
Posted: Thu Dec 01, 2011 5:13 am Post subject: |
|
|
Common problem with a non UTF-8 locale setting and distutils with Python 3. I normally work around it by doing the following:
Code: | env LANG="en_US.utf8" emerge -av1 cat/pkg |
A current search on bugzilla doesn't show a bug for it, so I would go ahead and file one. |
|
Back to top |
|
|
FuzzyRay Retired Dev
Joined: 02 Oct 2003 Posts: 79
|
Posted: Thu Dec 01, 2011 4:28 pm Post subject: |
|
|
Since I just hit the bug as well on one of my systems, I've filed bug 392739 for the issue. |
|
Back to top |
|
|
jeffk l33t
Joined: 13 Sep 2003 Posts: 671
|
Posted: Sun Dec 04, 2011 7:41 pm Post subject: |
|
|
Thanks for the tip, and for filing the bug. This info helped me notice that the servers on which virtualenv was failing had no locale set, they were posix by default.
Normalized all to LANG=en_US.UTF-8:
Code: | $ cat /etc/env.d/02locale
LANG="en_US.UTF-8" |
And virtualenv builds fine. This is not the same as fixing the bug under posix locales, of course. |
|
Back to top |
|
|
blietaer Tux's lil' helper
Joined: 27 Apr 2006 Posts: 103
|
Posted: Mon Mar 25, 2013 3:56 pm Post subject: |
|
|
FuzzyRay wrote: | Common problem with a non UTF-8 locale setting and distutils with Python 3. I normally work around it by doing the following:
Code: | env LANG="en_US.utf8" emerge -av1 cat/pkg |
|
It did fix my similar issue of the day (python-mpd in ~amd64) !
Shit....
...I guess I have to turn this in a permanent way, right?
I do not have any issue to run my whole bitch in utf8 (even belgian/french over here for many document/mail/writing...)
My /etc/locale.gen is however:
Code: | en_US ISO-8859-1
en_US.UTF-8 UTF-8
#ja_JP.EUC-JP EUC-JP
#ja_JP.UTF-8 UTF-8
#ja_JP EUC-JP
#en_HK ISO-8859-1
#en_PH ISO-8859-1
#de_DE ISO-8859-1
#de_DE@euro ISO-8859-15
#es_MX ISO-8859-1
#fa_IR UTF-8
fr_BE ISO-8859-1
fr_BE@euro ISO-8859-15
#it_IT ISO-8859-1
|
Not enough ? |
|
Back to top |
|
|
FuzzyRay Retired Dev
Joined: 02 Oct 2003 Posts: 79
|
Posted: Mon Mar 25, 2013 4:09 pm Post subject: |
|
|
blietaer wrote: | Not enough ? |
Set LC_CTYPE to a UTF8 locale and everything should work okay. Here are my settings for one of my servers:
Code: | # locale
LANG=
LC_CTYPE=en_US.utf8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL= |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|