Debian Bug report logs -
#754248
python-virtualenv: “ValueError: zero length field name in format” when creating virtualenv
Reported by: John Kristensen <john@jerrykan.com>
Date: Wed, 9 Jul 2014 05:48:07 UTC
Severity: important
Found in version python-virtualenv/1.11.6-2
Fixed in version python-virtualenv/15.0.3+ds-3
Done: Barry Warsaw <barry@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Wed, 09 Jul 2014 05:48:12 GMT) (full text, mbox, link).
Acknowledgement sent
to John Kristensen <john@jerrykan.com>:
New Bug report received and forwarded. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Wed, 09 Jul 2014 05:48:12 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: python-virtualenv
Version: 1.11.6-2
Severity: important
Dear Maintainer,
Attempting to create a python2.6 virtualenv using the following command:
virtualenv -p python2.6 venv
Results in the follow error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2378, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 830, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1016, in
create_environment
'/usr/share/python-wheels/{}-*.whl'.format(project))
ValueError: zero length field name in format
It seems to be due to the use of '{}' for string substitution which is not
compatible with python2.6.
-- System Information:
Debian Release: jessie/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable'), (460, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-virtualenv depends on:
ii python 2.7.6-2
ii python-pip-whl 1.5.6-2
ii python-pkg-resources 5.3-1
ii python-setuptools-whl 5.3-1
Versions of packages python-virtualenv recommends:
ii virtualenv 1.11.6-2
python-virtualenv suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Thu, 17 Jul 2014 19:18:04 GMT) (full text, mbox, link).
Acknowledgement sent
to jb <jacekfoo@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Thu, 17 Jul 2014 19:18:04 GMT) (full text, mbox, link).
Message #10 received at 754248@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
This affects me too. Regrettably some of us still need to use and develop
systems based on legacy python versions, having virtualenv working with old
python versions is important.
Problem might be related to the fact that virtualenv command now uses
python3 by default.
which virtualenv
/usr/bin/virtualenv
cat /usr/bin/virtualenv
#! /usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT:
'virtualenv==1.11.6','console_scripts','virtualenv'
__requires__ = 'virtualenv==1.11.6'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('virtualenv==1.11.6', 'console_scripts',
'virtualenv')()
)
JB
[Message part 2 (text/html, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Thu, 17 Jul 2014 19:27:08 GMT) (full text, mbox, link).
Acknowledgement sent
to Scott Kitterman <debian@kitterman.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Thu, 17 Jul 2014 19:27:08 GMT) (full text, mbox, link).
Message #15 received at 754248@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Thursday, July 17, 2014 21:15:07 jb wrote:
> This affects me too. Regrettably some of us still need to use and develop
> systems based on legacy python versions, having virtualenv working with old
> python versions is important.
But unrelated to if virtualenv is using python or python3 as it's runtime. It
still support python virtual environments (modulo bugs such as this one).
Scott K
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Wed, 06 Aug 2014 12:30:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Renat Sabitov <r.sabitov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Wed, 06 Aug 2014 12:30:04 GMT) (full text, mbox, link).
Message #20 received at 754248@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Dear Maintainer,
I tried to replace {} with % operator and now I'm having following errors:
New python executable in py26/bin/python2.6
Also creating executable in py26/bin/python
Installing setuptools, pip...
Complete output from command /home/rsabitov/work/...x/py26/bin/python2.6
-c "import sys, pip; sys...d\"] + sys.argv[1:]))" s
etuptools pip:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/__init__.py",
line 61, in <module>
File
"/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/vcs/mercurial.py",
line 9, in <module>
File
"/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/download.py",
line 22, in <module>
File
"/home/rsabitov/work/phoenix/ums/tests/system/.tox/py26/lib/python-wheels/requests-2.3.0-py2.py3-none-any.whl/requests/
__init__.py", line 58, in <module>
File
"/home/rsabitov/work/phoenix/ums/tests/system/.tox/py26/lib/python-wheels/requests-2.3.0-py2.py3-none-any.whl/requests/
utils.py", line 25, in <module>
File
"/home/rsabitov/work/phoenix/ums/tests/system/.tox/py26/lib/python-wheels/requests-2.3.0-py2.py3-none-any.whl/requests/
compat.py", line 92, in <module>
File
"/home/rsabitov/work/phoenix/ums/tests/system/.tox/py26/lib/python-wheels/urllib3-1.8.3-py2.py3-none-any.whl/urllib3/__
init__.py", line 16, in <module>
File
"/home/rsabitov/work/phoenix/ums/tests/system/.tox/py26/lib/python-wheels/urllib3-1.8.3-py2.py3-none-any.whl/urllib3/co
nnectionpool.py", line 33, in <module>
ImportError: cannot import name CertificateError
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2378, in
<module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 830, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1032, in
create_environment
install_wheel(to_install, py_executable, search_dirs)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 975, in
install_wheel
'PIP_NO_INDEX': '1'
File "/usr/lib/python3/dist-packages/virtualenv.py", line 917, in
call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/rsabitov/work/...x/py26/bin/python2.6 -c "import
sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error
code 1
Running virtualenv with interpreter /usr/bin/python2.6
ERROR: InvocationError: /usr/bin/python3 -mvirtualenv --setuptools --python
/usr/bin/python2.6 py26 (see
/home/rsabitov/work/phoenix/ums/tests/system/.tox/py26/log/py26-0.log)
The problem is that virtualenv install wheels from python3 and among them a
recent version of urllib3. It in turn requires
a recent ssl package with CertificateError. python2.6-minimal package has
an old version without required class.
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.14-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) (ignored:
LC_ALL set to en_AU.UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python3-virtualenv depends on:
ii python-pip-whl 1.5.6-2
ii python-setuptools-whl 5.4.1-1
ii python3 3.4.1-1
ii python3-pkg-resources 5.4.1-1
pn python3:any <none>
python3-virtualenv recommends no packages.
python3-virtualenv suggests no packages.
-- no debconf information
[Message part 2 (text/html, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Tue, 18 Nov 2014 21:21:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Stefano Rivera <stefanor@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Tue, 18 Nov 2014 21:21:05 GMT) (full text, mbox, link).
Message #25 received at 754248@bugs.debian.org (full text, mbox, reply):
Hi Renat (2014.08.06_05:27:47_-0700)
> I tried to replace {} with % operator and now I'm having following errors:
> ImportError: cannot import name CertificateError
That is being tracked in #755106 and #763389, and I intend to fix it
soon.
SR
--
Stefano Rivera
http://tumbleweed.org.za/
H: +27 21 461 1230 C: +27 72 419 8559
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Thu, 08 Jan 2015 03:57:10 GMT) (full text, mbox, link).
Acknowledgement sent
to John Kristensen <john@jerrykan.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Thu, 08 Jan 2015 03:57:10 GMT) (full text, mbox, link).
Message #30 received at 754248@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On 19/11/14 08:17, Stefano Rivera wrote:
> Hi Renat (2014.08.06_05:27:47_-0700)
>> I tried to replace {} with % operator and now I'm having following errors:
>
>> ImportError: cannot import name CertificateError
>
> That is being tracked in #755106 and #763389, and I intend to fix it
> soon.
>
> SR
>
With #755106 and #763389 resolved the attached patch now fixes this
issue for me.
[754248.patch (text/x-patch, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Thu, 08 Jan 2015 04:21:20 GMT) (full text, mbox, link).
Acknowledgement sent
to Stefano Rivera <stefanor@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Thu, 08 Jan 2015 04:21:20 GMT) (full text, mbox, link).
Message #35 received at 754248@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi John (2015.01.08_05:24:06_+0200)
> ++ '/usr/share/python-wheels/{0}-*.whl'.format(project))
> -+ '/usr/share/python-wheels/{}-*.whl'.format(project))
That's simple enough that it is reasonable to apply. However we've
probably missed the boat for Debian Jessie.
SR
--
Stefano Rivera
http://tumbleweed.org.za/
+1 415 683 3272
[signature.asc (application/pgp-signature, inline)]
Changed Bug title to 'python-virtualenv: “ValueError: zero length field name in format” when creating virtualenv' from 'python-virtualenv: Error when attempting to create a python2.6 virtualenv'.
Request was from Ben Finney <bignose@debian.org>
to control@bugs.debian.org.
(Sat, 08 Oct 2016 06:00:02 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Sun, 13 Nov 2016 21:18:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Arthur de Jong <arthur@arthurdejong.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Sun, 13 Nov 2016 21:18:03 GMT) (full text, mbox, link).
Message #42 received at 754248@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Thu, 2015-01-08 at 06:08 +0200, Stefano Rivera wrote:
> Hi John (2015.01.08_05:24:06_+0200)
> > ++ '/usr/share/python-wheels/{0}-*.whl'.format(project))
> > -+ '/usr/share/python-wheels/{}-*.whl'.format(project))
>
> That's simple enough that it is reasonable to apply. However we've
> probably missed the boat for Debian Jessie.
I just ran into this today and I can confirm that the above fix allows
me to move forward with a Python 2.6 virtualenv. Can you fix this for
unstable?
I know Python 2.6 is no longer supported within Debian but I want to
run some tests with a locally-compiled Python 2.6 to ensure that my
code still works with that if needed.
Thanks,
--
-- arthur - arthur@arthurdejong.org - https://arthurdejong.org/ --
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Mon, 14 Nov 2016 15:33:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Mon, 14 Nov 2016 15:33:02 GMT) (full text, mbox, link).
Message #47 received at 754248@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Nov 13, 2016, at 10:14 PM, Arthur de Jong wrote:
>I just ran into this today and I can confirm that the above fix allows
>me to move forward with a Python 2.6 virtualenv. Can you fix this for
>unstable?
Yes, I'll upload this fix to unstable momentarily.
[Message part 2 (application/pgp-signature, inline)]
Reply sent
to Barry Warsaw <barry@debian.org>:
You have taken responsibility.
(Mon, 14 Nov 2016 16:21:11 GMT) (full text, mbox, link).
Notification sent
to John Kristensen <john@jerrykan.com>:
Bug acknowledged by developer.
(Mon, 14 Nov 2016 16:21:11 GMT) (full text, mbox, link).
Message #52 received at 754248-close@bugs.debian.org (full text, mbox, reply):
Source: python-virtualenv
Source-Version: 15.0.3+ds-3
We believe that the bug you reported is fixed in the latest version of
python-virtualenv, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 754248@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Barry Warsaw <barry@debian.org> (supplier of updated python-virtualenv package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Mon, 14 Nov 2016 10:55:04 -0500
Source: python-virtualenv
Binary: python-virtualenv python3-virtualenv virtualenv
Architecture: source all
Version: 15.0.3+ds-3
Distribution: unstable
Urgency: medium
Maintainer: Barry Warsaw <barry@debian.org>
Changed-By: Barry Warsaw <barry@debian.org>
Description:
python-virtualenv - Python virtual environment creator
python3-virtualenv - Python virtual environment creator
virtualenv - Python virtual environment creator
Closes: 754248
Changes:
python-virtualenv (15.0.3+ds-3) unstable; urgency=medium
.
* d/patches/use-wheels.patch: Use a Python 2.6-friendly format string.
(Closes: #754248)
Checksums-Sha1:
94a8fab4433e81843a71a9c002ae77987acdf867 2607 python-virtualenv_15.0.3+ds-3.dsc
dd5074c3b46a456ec9ea79e09ae9d71178557e7a 41772 python-virtualenv_15.0.3+ds-3.debian.tar.xz
f113f0bf2923e814f71534cf64ff29fdf71d480a 6334 python-virtualenv_15.0.3+ds-3_20161114T155936z-c504cccd.buildinfo
38827281c0c7caba68615671605ad9456e2a1729 60990 python-virtualenv_15.0.3+ds-3_all.deb
9b31b2e37996ca6d7029e11b44177a67a6574978 57642 python3-virtualenv_15.0.3+ds-3_all.deb
822c68e3e1696ca5a8644708df57e64579e35700 19622 virtualenv_15.0.3+ds-3_all.deb
Checksums-Sha256:
4387f1578262383c525ed120c5d16acda41a1965d448a47ab5e1870b57ff1066 2607 python-virtualenv_15.0.3+ds-3.dsc
c6a4be15dc67b44d0ffc7f3065b8d965eb7db67555356f23fdecf183a8e29414 41772 python-virtualenv_15.0.3+ds-3.debian.tar.xz
79b2a5f2c0e6d95b21029ffe25ae73261f8b98caf24bb2eb95bd50a2d1255aa2 6334 python-virtualenv_15.0.3+ds-3_20161114T155936z-c504cccd.buildinfo
0c6fa3583694224b13ee1e5abe61833b60c5c79fdf7b36fb0cdb65c55ed80111 60990 python-virtualenv_15.0.3+ds-3_all.deb
e061d22170910aae029ba93c7935feaf270b134035848c95d8f6814c6243da75 57642 python3-virtualenv_15.0.3+ds-3_all.deb
2cc69eb4f9e4ef4b98412311d2aede11dd76f8d16308b0db37f1a5025b2bcc8a 19622 virtualenv_15.0.3+ds-3_all.deb
Files:
31123d917b9ca730406e51a3ed9c7afa 2607 python optional python-virtualenv_15.0.3+ds-3.dsc
bd4cfc09a7ec4fa0afb244eb19b342f2 41772 python optional python-virtualenv_15.0.3+ds-3.debian.tar.xz
c504cccde9d0bf38178141a8995a7267 6334 python optional python-virtualenv_15.0.3+ds-3_20161114T155936z-c504cccd.buildinfo
727f4f662e59e76b1949d5de5d37efa7 60990 python optional python-virtualenv_15.0.3+ds-3_all.deb
08507fed2f4f3ccd7adfb20de10f8563 57642 python optional python3-virtualenv_15.0.3+ds-3_all.deb
e2debf767e9d802a07fbfcc741ab3eba 19622 python optional virtualenv_15.0.3+ds-3_all.deb
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEhBcVftvnPZ6sHlObEm61Y6dLBr8FAlgp35AACgkQEm61Y6dL
Br/JAxAAr7JE/wUBAH+lvqrfxbA3NEqDSGzzKGUNBtQKFpU3oEZwMVa8G28T9wWO
7ZjpwTPIlpNWjZ4xEOZ/95za3aCjHdbpP4Ckssf8ThK+pCXFn0fiT9Sls9yIwUJD
nbIO30u5DUuOCVIpXPsWedu0DeMz1reLfuAa5FAni1lASBI6uZwqdhDGk0jxY6bC
cVEoqy1zwNxrrHFchQvbE9/ZU0p6B1AVzcEuAmN2MvJS0pojM0Q+dcoQ3uUN5A/Y
CDpnGPYSeXQH40M+pmuvqLy3kJQJdJrt4yqMxy6LGTJXRuZs086+R5sbWj5f421H
EJPXx2mVczhbXye9Bw16yHoyyyHSh9l//eT9KvB95k/IM4/lCCtjUgsaiqW1YvlL
ToZj4yyABq56Jjawdw4r9N+BD67n6G/RHuOwwexGcORPzwKuK7FgV2CoLebHvtrB
dwZm0HoQuWvfDrUMvb+3WdZL4GLniS037o1wQkMfbpx7gI6mFiWXK7BksPusu58P
cx1pH16Janqp8XxfTv64TyvguO2antcuhY9i4hiqNy7ejCnpcdE3yrzcASNENYUG
a33/W9+t02A+wVla07TR+DrJAHHCJPur40NDHDU8YOAwci1UMm65LByoHmzraOzp
Z2ETEF5q+GHBrTY9rKvLSNfiFb8JGUgQJdhZACmvecWByfDFOCA=
=wzLh
-----END PGP SIGNATURE-----
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#754248; Package python-virtualenv.
(Mon, 14 Nov 2016 22:51:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Arthur de Jong <arthur@arthurdejong.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Mon, 14 Nov 2016 22:51:03 GMT) (full text, mbox, link).
Message #57 received at 754248@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Mon, 2016-11-14 at 10:28 -0500, Barry Warsaw wrote:
> On Nov 13, 2016, at 10:14 PM, Arthur de Jong wrote:
> > I just ran into this today and I can confirm that the above fix
> > allows me to move forward with a Python 2.6 virtualenv. Can you fix
> > this for unstable?
>
> Yes, I'll upload this fix to unstable momentarily.
Thanks.
Just managed to get everything working with the python2.6 from wheezy :)
--
-- arthur - arthur@arthurdejong.org - https://arthurdejong.org/ --
[signature.asc (application/pgp-signature, inline)]
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 29 Dec 2016 08:36:31 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Jan 6 22:25:31 2018;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.