Bill Farner created AURORA-460:
----------------------------------
Summary: Python build commands regularly fail with ZipImportError
Key: AURORA-460
URL: https://issues.apache.org/jira/browse/AURORA-460
Project: Aurora
Issue Type: Bug
Components: Build
Reporter: Bill Farner
Assignee: Jake Farrell
Priority: Critical
The sequence below has seemingly become the norm: run a build, get
ZipImportError, run build again, get a ZipImportError on a different egg,
eventually succeed.
{noformat}
$ ./pants src/main/python/apache/aurora/client/bin/:aurora_client
Build operating on targets:
OrderedSet([PythonBinary(src/main/python/apache/aurora/client/bin/BUILD:aurora_client)])
Building PythonBinary
PythonBinary(src/main/python/apache/aurora/client/bin/BUILD:aurora_client):
Problem executing PythonBuilder for targets
OrderedSet([PythonBinary(src/main/python/apache/aurora/client/bin/BUILD:aurora_client)]):
Traceback (most recent call last):
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/commands/build.py",
line 124, in _python_build
conn_timeout=self.options.conn_timeout)
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/python_builder.py",
line 61, in build
conn_timeout=conn_timeout).run()
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/binary_builder.py",
line 65, in run
env = self.chroot.dump()
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/python_chroot.py",
line 201, in dump
platforms=platforms)
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/resolver.py",
line 109, in resolve_multi
platform=platform)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/resolver.py",
line 107, in resolve
new_requirements.update(requires(highest_package, requirement))
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/resolver.py",
line 79, in requires
dist = obtainer.obtain(package)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/obtainer.py",
line 158, in obtain
dist = super(CachingObtainer, self).obtain(req_or_package)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/obtainer.py",
line 108, in obtain
return self._translate_from([req_or_package])
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/obtainer.py",
line 96, in _translate_from
dist = self._translator.translate(package)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/translator.py",
line 44, in translate
dist = tx.translate(package)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/translator.py",
line 116, in translate
return DistributionHelper.distribution_from_path(target_path)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/util.py",
line 50, in distribution_from_path
distributions = list(find_distributions(path))
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/finders.py",
line 61, in __call__
for dist in finder(importer, path_item, only=only):
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/finders.py",
line 203, in find_wheels_in_zip
dist = wheel_from_metadata(path_item, metadata)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/finders.py",
line 165, in wheel_from_metadata
pkg_info =
Parser().parsestr(metadata.get_metadata(pkg_resources.DistInfoDistribution.PKG_INFO))
File
"/home/wfarner/code/aurora/build-support/pants-0.0.23.pex/.bootstrap/pkg_resources.py",
line 1401, in get_metadata
return self._get(self._fn(self.egg_info, name))
File
"/home/wfarner/code/aurora/build-support/pants-0.0.23.pex/.bootstrap/pkg_resources.py",
line 1465, in _get
return self.loader.get_data(path)
ZipImportError: bad local file header in
/home/wfarner/code/aurora/.pants.d/python/eggs/thrift-0.9.1-cp26-none-linux_x86_64.whl
Usage:
pants-0.0.23.pex build (options) [spec] (build args)
pants-0.0.23.pex build (options) [spec]... -- (build args)
Options:
--version show program's version number and exit
-h, --help show this help message and exit
--no-pantsrc Specifies that pantsrc files should be ignored.
--log-exit Log an exit message on success or failure.
-t CONN_TIMEOUT, --timeout=CONN_TIMEOUT
Number of seconds to wait for http connections.
-i INTERPRETER, --interpreter=INTERPRETER
The interpreter requirement for this chroot.
-v, --verbose Show verbose output.
Builds the specified Python target(s). Use ./pants goal for JVM and other
targets.
wfarner@bill-desktop:~/code/aurora$ ./pants
src/main/python/apache/aurora/client/bin/:aurora_client
Build operating on targets:
OrderedSet([PythonBinary(src/main/python/apache/aurora/client/bin/BUILD:aurora_client)])
Building PythonBinary
PythonBinary(src/main/python/apache/aurora/client/bin/BUILD:aurora_client):
Problem executing PythonBuilder for targets
OrderedSet([PythonBinary(src/main/python/apache/aurora/client/bin/BUILD:aurora_client)]):
Traceback (most recent call last):
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/commands/build.py",
line 124, in _python_build
conn_timeout=self.options.conn_timeout)
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/python_builder.py",
line 61, in build
conn_timeout=conn_timeout).run()
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/binary_builder.py",
line 65, in run
env = self.chroot.dump()
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/python_chroot.py",
line 201, in dump
platforms=platforms)
File
"/home/wfarner/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.e761a8c0752b72217447b4313360984a6a103958/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/resolver.py",
line 109, in resolve_multi
platform=platform)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/resolver.py",
line 107, in resolve
new_requirements.update(requires(highest_package, requirement))
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/resolver.py",
line 79, in requires
dist = obtainer.obtain(package)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/obtainer.py",
line 158, in obtain
dist = super(CachingObtainer, self).obtain(req_or_package)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/obtainer.py",
line 108, in obtain
return self._translate_from([req_or_package])
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/obtainer.py",
line 96, in _translate_from
dist = self._translator.translate(package)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/translator.py",
line 44, in translate
dist = tx.translate(package)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/translator.py",
line 116, in translate
return DistributionHelper.distribution_from_path(target_path)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/util.py",
line 50, in distribution_from_path
distributions = list(find_distributions(path))
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/finders.py",
line 61, in __call__
for dist in finder(importer, path_item, only=only):
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/finders.py",
line 203, in find_wheels_in_zip
dist = wheel_from_metadata(path_item, metadata)
File
"/home/wfarner/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.e611eeec84826ed35d20613afe4bb069da8eba5f/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/finders.py",
line 165, in wheel_from_metadata
pkg_info =
Parser().parsestr(metadata.get_metadata(pkg_resources.DistInfoDistribution.PKG_INFO))
File
"/home/wfarner/code/aurora/build-support/pants-0.0.23.pex/.bootstrap/pkg_resources.py",
line 1401, in get_metadata
return self._get(self._fn(self.egg_info, name))
File
"/home/wfarner/code/aurora/build-support/pants-0.0.23.pex/.bootstrap/pkg_resources.py",
line 1465, in _get
return self.loader.get_data(path)
ZipImportError: bad local file header in
/home/wfarner/code/aurora/.pants.d/python/eggs/zope.interface-4.1.1-cp26-none-linux_x86_64.whl
Usage:
pants-0.0.23.pex build (options) [spec] (build args)
pants-0.0.23.pex build (options) [spec]... -- (build args)
Options:
--version show program's version number and exit
-h, --help show this help message and exit
--no-pantsrc Specifies that pantsrc files should be ignored.
--log-exit Log an exit message on success or failure.
-t CONN_TIMEOUT, --timeout=CONN_TIMEOUT
Number of seconds to wait for http connections.
-i INTERPRETER, --interpreter=INTERPRETER
The interpreter requirement for this chroot.
-v, --verbose Show verbose output.
Builds the specified Python target(s). Use ./pants goal for JVM and other
targets.
wfarner@bill-desktop:~/code/aurora$ ./pants
src/main/python/apache/aurora/client/bin/:aurora_client
Build operating on targets:
OrderedSet([PythonBinary(src/main/python/apache/aurora/client/bin/BUILD:aurora_client)])
Building PythonBinary
PythonBinary(src/main/python/apache/aurora/client/bin/BUILD:aurora_client):
Wrote /home/wfarner/code/aurora/dist/aurora_client.pex
{noformat}
Assigning to [~jfarrell] as he said he might have time to work on this soon.
--
This message was sent by Atlassian JIRA
(v6.2#6252)