Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine Python 3.7 build error: `pip_download_wheels` returned code: 1

I am using Django REST Framework to deploy on Google App Engine and my requirements.txt file is as follows:

asn1crypto==0.24.0
astroid==2.1.0
boto3==1.9.55
botocore==1.12.55
certifi==2018.8.13
cffi==1.11.5
chardet==3.0.4
colorama==0.4.1
coreapi==2.3.3
coreschema==0.0.4
cryptography==2.4.2
defusedxml==0.5.0
Django==2.1
django-allauth==0.36.0
django-filter==2.0.0
django-rest-auth==0.9.3
django-rest-swagger==2.0.7
djangorestframework==3.8.2
djangorestframework-jwt==1.11.0
docutils==0.14
idna==2.7
isort==4.3.4
itypes==1.1.0
Jinja2==2.10
jmespath==0.9.3
lazy-object-proxy==1.3.1
lxml==4.2.5
MarkupSafe==1.0
mccabe==0.6.1
oauthlib==2.1.0
openapi-codec==1.3.2
Pillow==5.3.0
pycparser==2.19
PyJWT==1.6.4
pylint==2.2.2
PyMySQL==0.9.2
python-dateutil==2.7.5
python-social-auth==0.3.6
python3-openid==3.1.0
pytz==2018.5
requests==2.19.1
requests-oauthlib==1.0.0
s3transfer==0.1.13
simplejson==3.16.0
six==1.11.0
social-auth-app-django==3.1.0
social-auth-core==2.0.0
typed-ast==1.1.0
uritemplate==3.0.0
urllib3==1.23
virtualenv==16.0.0
wrapt==1.10.11

Here is my app.yaml file and my project runs fine on local pip venv:

# [START django_app]
runtime: python37

handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
- url: /static
  static_dir: static/

# This handler routes all requests not caught above to your main app. It is
# required when static routes are defined, but can be omitted (along with
# the entire handlers section) when there are no static files defined.
- url: /.*
  script: auto
# [END django_app]

But when I try to deploy it on Google App Engine using the following command I am getting the following error on build time. I am using following article https://cloud.google.com/python/django/appengine

gcloud app deploy

Error from Build log:

ERROR: build step 1 "gcr.io/gae-runtimes/python37_app_builder:python37_3_7_1_20181112_RC01" failed: exit status 1
ERROR
Finished Step #1 - "builder"
Step #1 - "builder": error: `pip_download_wheels` returned code: 2
Step #1 - "builder": 
Step #1 - "builder": ValueError: embedded null byte
Step #1 - "builder": st = os.stat(s)
Step #1 - "builder": File "/env/lib/python3.7/genericpath.py", line 42, in isdir
Step #1 - "builder": looks_like_dir = os.path.isdir(p) and (
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/req/constructors.py", line 207, in install_req_from_line
Step #1 - "builder": isolated=isolated, options=req_options, wheel_cache=wheel_cache
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/req/req_file.py", line 158, in process_line
Step #1 - "builder": for req in req_iter:
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/req/req_file.py", line 91, in parse_requirements
Step #1 - "builder": wheel_cache=wheel_cache):
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 235, in populate_requirement_set
Step #1 - "builder": self.name, wheel_cache
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/commands/wheel.py", line 135, in run
Step #1 - "builder": status = self.run(options, args)
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder": Exception:
Step #1 - "builder": ERROR `pip_download_wheels` had stderr output:
Step #1 - "builder": INFO full build took 5 seconds
Step #1 - "builder": INFO build process for FTL image took 5 seconds
Step #1 - "builder": INFO pip_download_wheels took 0 seconds
Step #1 - "builder": ERROR error: `pip_download_wheels` returned code: 2
Step #1 - "builder": 
Step #1 - "builder": ValueError: embedded null byte
Step #1 - "builder": st = os.stat(s)
Step #1 - "builder": File "/env/lib/python3.7/genericpath.py", line 42, in isdir
Step #1 - "builder": looks_like_dir = os.path.isdir(p) and (
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/req/constructors.py", line 207, in install_req_from_line
Step #1 - "builder": isolated=isolated, options=req_options, wheel_cache=wheel_cache
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/req/req_file.py", line 158, in process_line
Step #1 - "builder": for req in req_iter:
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/req/req_file.py", line 91, in parse_requirements
Step #1 - "builder": wheel_cache=wheel_cache):
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 235, in populate_requirement_set
Step #1 - "builder": self.name, wheel_cache
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/commands/wheel.py", line 135, in run
Step #1 - "builder": status = self.run(options, args)
Step #1 - "builder": File "/env/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder": Exception:
Step #1 - "builder": INFO `pip_download_wheels` had stderr output:
Step #1 - "builder": 
Step #1 - "builder": INFO `pip_download_wheels` stdout:
Step #1 - "builder": INFO pip_download_wheels /env/bin/python3.7 -m pip wheel -w /tmp/tmp_5Kp_T/wheel -r requirements.txt --disable-pip-version-check
Step #1 - "builder": INFO starting: pip_download_wheels
Step #1 - "builder": 
Step #1 - "builder": gunicorn
Step #1 - "builder": 
Step #1 - "builder": wrapt==1.10.11
Step #1 - "builder": virtualenv==16.0.0
Step #1 - "builder": urllib3==1.23
Step #1 - "builder": uritemplate==3.0.0
Step #1 - "builder": typed-ast==1.1.0
Step #1 - "builder": social-auth-core==2.0.0
Step #1 - "builder": social-auth-app-django==3.1.0
Step #1 - "builder": six==1.11.0
Step #1 - "builder": simplejson==3.16.0
Step #1 - "builder": s3transfer==0.1.13
Step #1 - "builder": requests-oauthlib==1.0.0
Step #1 - "builder": requests==2.19.1
Step #1 - "builder": pytz==2018.5
Step #1 - "builder": python3-openid==3.1.0
Step #1 - "builder": python-social-auth==0.3.6
Step #1 - "builder": python-dateutil==2.7.5
Step #1 - "builder": PyMySQL==0.9.2
Step #1 - "builder": pylint==2.2.2
Step #1 - "builder": PyJWT==1.6.4
Step #1 - "builder": pycparser==2.19
Step #1 - "builder": Pillow==5.3.0
Step #1 - "builder": openapi-codec==1.3.2
Step #1 - "builder": oauthlib==2.1.0
Step #1 - "builder": mccabe==0.6.1
Step #1 - "builder": MarkupSafe==1.0
Step #1 - "builder": lxml==4.2.5
Step #1 - "builder": lazy-object-proxy==1.3.1
Step #1 - "builder": jmespath==0.9.3
Step #1 - "builder": Jinja2==2.10
Step #1 - "builder": itypes==1.1.0
Step #1 - "builder": isort==4.3.4
Step #1 - "builder": idna==2.7
Step #1 - "builder": docutils==0.14
Step #1 - "builder": djangorestframework-jwt==1.11.0
Step #1 - "builder": djangorestframework==3.8.2
Step #1 - "builder": django-rest-swagger==2.0.7
Step #1 - "builder": django-rest-auth==0.9.3
Step #1 - "builder": django-filter==2.0.0
Step #1 - "builder": django-allauth==0.36.0
Step #1 - "builder": Django==2.1
Step #1 - "builder": defusedxml==0.5.0
Step #1 - "builder": cryptography==2.4.2
Step #1 - "builder": coreschema==0.0.4
Step #1 - "builder": colorama==0.4.1
Step #1 - "builder": chardet==3.0.4
Step #1 - "builder": cffi==1.11.5
Step #1 - "builder": certifi==2018.8.13
Step #1 - "builder": botocore==1.12.55
Step #1 - "builder": boto3==1.9.55
Step #1 - "builder": astroid==2.1.0
Step #1 - "builder": INFO new_descriptor_contents: 
Step #1 - "builder": 
Step #1 - "builder": gunicorn
Step #1 - "builder": 
Step #1 - "builder": wrapt==1.10.11
Step #1 - "builder": virtualenv==16.0.0
Step #1 - "builder": urllib3==1.23
Step #1 - "builder": uritemplate==3.0.0
Step #1 - "builder": typed-ast==1.1.0
Step #1 - "builder": social-auth-core==2.0.0
Step #1 - "builder": social-auth-app-django==3.1.0
Step #1 - "builder": six==1.11.0
Step #1 - "builder": simplejson==3.16.0
Step #1 - "builder": s3transfer==0.1.13
Step #1 - "builder": requests-oauthlib==1.0.0
Step #1 - "builder": requests==2.19.1
Step #1 - "builder": pytz==2018.5
Step #1 - "builder": python3-openid==3.1.0
Step #1 - "builder": python-social-auth==0.3.6
Step #1 - "builder": python-dateutil==2.7.5
Step #1 - "builder": PyMySQL==0.9.2
Step #1 - "builder": pylint==2.2.2
Step #1 - "builder": PyJWT==1.6.4
Step #1 - "builder": pycparser==2.19
Step #1 - "builder": Pillow==5.3.0
Step #1 - "builder": openapi-codec==1.3.2
Step #1 - "builder": oauthlib==2.1.0
Step #1 - "builder": mccabe==0.6.1
Step #1 - "builder": MarkupSafe==1.0
Step #1 - "builder": lxml==4.2.5
Step #1 - "builder": lazy-object-proxy==1.3.1
Step #1 - "builder": jmespath==0.9.3
Step #1 - "builder": Jinja2==2.10
Step #1 - "builder": itypes==1.1.0
Step #1 - "builder": isort==4.3.4
Step #1 - "builder": idna==2.7
Step #1 - "builder": docutils==0.14
Step #1 - "builder": djangorestframework-jwt==1.11.0
Step #1 - "builder": djangorestframework==3.8.2
Step #1 - "builder": django-rest-swagger==2.0.7
Step #1 - "builder": django-rest-auth==0.9.3
Step #1 - "builder": django-filter==2.0.0
Step #1 - "builder": django-allauth==0.36.0
Step #1 - "builder": Django==2.1
Step #1 - "builder": defusedxml==0.5.0
Step #1 - "builder": cryptography==2.4.2
Step #1 - "builder": coreschema==0.0.4
Step #1 - "builder": colorama==0.4.1
Step #1 - "builder": chardet==3.0.4
Step #1 - "builder": cffi==1.11.5
Step #1 - "builder": certifi==2018.8.13
Step #1 - "builder": botocore==1.12.55
Step #1 - "builder": boto3==1.9.55
Step #1 - "builder": astroid==2.1.0
Step #1 - "builder": INFO descriptor_contents:
Step #1 - "builder": INFO create_virtualenv took 3 seconds
Step #1 - "builder": 
Step #1 - "builder": done.
Step #1 - "builder": Installing setuptools, pip, wheel...
Step #1 - "builder": Also creating executable in /env/bin/python
Step #1 - "builder": New python executable in /env/bin/python3.7
Step #1 - "builder": Using base prefix '/opt/python3.7'
Step #1 - "builder": Already using interpreter /opt/python3.7/bin/python3.7
Step #1 - "builder": INFO `create_virtualenv` stdout:
Step #1 - "builder": INFO create_virtualenv /opt/python3.7/bin/python3.7 -m virtualenv --no-download /env -p /opt/python3.7/bin/python3.7
Step #1 - "builder": INFO starting: create_virtualenv
Step #1 - "builder": INFO checking_cached_requirements.txt_layer took 0 seconds
Step #1 - "builder": INFO [CACHE][MISS] v0.10.0:PYTHON (requirements)->db6d697e2acda217ea25588a91a62aac86c485af407cd96d55456ad6724c2b02
Step #1 - "builder": INFO check python version took 0 seconds
Step #1 - "builder": 
Step #1 - "builder": INFO `python version` stderr:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO `python version` full cmd:
Step #1 - "builder": INFO starting: check python version
Step #1 - "builder": 
Step #1 - "builder": gunicorn
Step #1 - "builder": 
Step #1 - "builder": wrapt==1.10.11
Step #1 - "builder": virtualenv==16.0.0
Step #1 - "builder": urllib3==1.23
Step #1 - "builder": uritemplate==3.0.0
Step #1 - "builder": typed-ast==1.1.0
Step #1 - "builder": social-auth-core==2.0.0
Step #1 - "builder": social-auth-app-django==3.1.0
Step #1 - "builder": six==1.11.0
Step #1 - "builder": simplejson==3.16.0
Step #1 - "builder": s3transfer==0.1.13
Step #1 - "builder": requests-oauthlib==1.0.0
Step #1 - "builder": requests==2.19.1
Step #1 - "builder": pytz==2018.5
Step #1 - "builder": python3-openid==3.1.0
Step #1 - "builder": python-social-auth==0.3.6
Step #1 - "builder": python-dateutil==2.7.5
Step #1 - "builder": PyMySQL==0.9.2
Step #1 - "builder": pylint==2.2.2
Step #1 - "builder": PyJWT==1.6.4
Step #1 - "builder": pycparser==2.19
Step #1 - "builder": Pillow==5.3.0
Step #1 - "builder": openapi-codec==1.3.2
Step #1 - "builder": oauthlib==2.1.0
Step #1 - "builder": mccabe==0.6.1
Step #1 - "builder": MarkupSafe==1.0
Step #1 - "builder": lxml==4.2.5
Step #1 - "builder": lazy-object-proxy==1.3.1
Step #1 - "builder": jmespath==0.9.3
Step #1 - "builder": Jinja2==2.10
Step #1 - "builder": itypes==1.1.0
Step #1 - "builder": isort==4.3.4
Step #1 - "builder": idna==2.7
Step #1 - "builder": docutils==0.14
Step #1 - "builder": djangorestframework-jwt==1.11.0
Step #1 - "builder": djangorestframework==3.8.2
Step #1 - "builder": django-rest-swagger==2.0.7
Step #1 - "builder": django-rest-auth==0.9.3
Step #1 - "builder": django-filter==2.0.0
Step #1 - "builder": django-allauth==0.36.0
Step #1 - "builder": Django==2.1
Step #1 - "builder": defusedxml==0.5.0
Step #1 - "builder": cryptography==2.4.2
Step #1 - "builder": coreschema==0.0.4
Step #1 - "builder": colorama==0.4.1
Step #1 - "builder": chardet==3.0.4
Step #1 - "builder": cffi==1.11.5
Step #1 - "builder": certifi==2018.8.13
Step #1 - "builder": botocore==1.12.55
Step #1 - "builder": boto3==1.9.55
Step #1 - "builder": astroid==2.1.0
Step #1 - "builder": INFO new_descriptor_contents: 
Step #1 - "builder": 
Step #1 - "builder": gunicorn
Step #1 - "builder": 
Step #1 - "builder": wrapt==1.10.11
Step #1 - "builder": virtualenv==16.0.0
Step #1 - "builder": urllib3==1.23
Step #1 - "builder": uritemplate==3.0.0
Step #1 - "builder": typed-ast==1.1.0
Step #1 - "builder": social-auth-core==2.0.0
Step #1 - "builder": social-auth-app-django==3.1.0
Step #1 - "builder": six==1.11.0
Step #1 - "builder": simplejson==3.16.0
Step #1 - "builder": s3transfer==0.1.13
Step #1 - "builder": requests-oauthlib==1.0.0
Step #1 - "builder": requests==2.19.1
Step #1 - "builder": pytz==2018.5
Step #1 - "builder": python3-openid==3.1.0
Step #1 - "builder": python-social-auth==0.3.6
Step #1 - "builder": python-dateutil==2.7.5
Step #1 - "builder": PyMySQL==0.9.2
Step #1 - "builder": pylint==2.2.2
Step #1 - "builder": PyJWT==1.6.4
Step #1 - "builder": pycparser==2.19
Step #1 - "builder": Pillow==5.3.0
Step #1 - "builder": openapi-codec==1.3.2
Step #1 - "builder": oauthlib==2.1.0
Step #1 - "builder": mccabe==0.6.1
Step #1 - "builder": MarkupSafe==1.0
Step #1 - "builder": lxml==4.2.5
Step #1 - "builder": lazy-object-proxy==1.3.1
Step #1 - "builder": jmespath==0.9.3
Step #1 - "builder": Jinja2==2.10
Step #1 - "builder": itypes==1.1.0
Step #1 - "builder": isort==4.3.4
Step #1 - "builder": idna==2.7
Step #1 - "builder": docutils==0.14
Step #1 - "builder": djangorestframework-jwt==1.11.0
Step #1 - "builder": djangorestframework==3.8.2
Step #1 - "builder": django-rest-swagger==2.0.7
Step #1 - "builder": django-rest-auth==0.9.3
Step #1 - "builder": django-filter==2.0.0
Step #1 - "builder": django-allauth==0.36.0
Step #1 - "builder": Django==2.1
Step #1 - "builder": defusedxml==0.5.0
Step #1 - "builder": cryptography==2.4.2
Step #1 - "builder": coreschema==0.0.4
Step #1 - "builder": colorama==0.4.1
Step #1 - "builder": chardet==3.0.4
Step #1 - "builder": cffi==1.11.5
Step #1 - "builder": certifi==2018.8.13
Step #1 - "builder": botocore==1.12.55
Step #1 - "builder": boto3==1.9.55
Step #1 - "builder": astroid==2.1.0
Step #1 - "builder": INFO descriptor_contents:
Step #1 - "builder": INFO No cached dependency layer for db6d697e2acda217ea25588a91a62aac86c485af407cd96d55456ad6724c2b02
Step #1 - "builder": INFO Cache miss on local cache for asia.gcr.io/e2isapjango/app-engine-tmp/build-cache/ttl-7d/python-cache:db6d697e2acda217ea25588a91a62aac86c485af407cd96d55456ad6724c2b02
Step #1 - "builder": INFO No cached base image found for entry: asia.gcr.io/e2isapjango/app-engine-tmp/build-cache/ttl-7d/python-cache:db6d697e2acda217ea25588a91a62aac86c485af407cd96d55456ad6724c2b02.
Step #1 - "builder": DEBUG Checking cache for cache_key db6d697e2acda217ea25588a91a62aac86c485af407cd96d55456ad6724c2b02
Step #1 - "builder": INFO check python version took 0 seconds
Step #1 - "builder": 
Step #1 - "builder": INFO `python version` stderr:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO `python version` full cmd:
Step #1 - "builder": INFO starting: check python version
Step #1 - "builder": 
Step #1 - "builder": gunicorn
Step #1 - "builder": 
Step #1 - "builder": wrapt==1.10.11
Step #1 - "builder": virtualenv==16.0.0
Step #1 - "builder": urllib3==1.23
Step #1 - "builder": uritemplate==3.0.0
Step #1 - "builder": typed-ast==1.1.0
Step #1 - "builder": social-auth-core==2.0.0
Step #1 - "builder": social-auth-app-django==3.1.0
Step #1 - "builder": six==1.11.0
Step #1 - "builder": simplejson==3.16.0
Step #1 - "builder": s3transfer==0.1.13
Step #1 - "builder": requests-oauthlib==1.0.0
Step #1 - "builder": requests==2.19.1
Step #1 - "builder": pytz==2018.5
Step #1 - "builder": python3-openid==3.1.0
Step #1 - "builder": python-social-auth==0.3.6
Step #1 - "builder": python-dateutil==2.7.5
Step #1 - "builder": PyMySQL==0.9.2
Step #1 - "builder": pylint==2.2.2
Step #1 - "builder": PyJWT==1.6.4
Step #1 - "builder": pycparser==2.19
Step #1 - "builder": Pillow==5.3.0
Step #1 - "builder": openapi-codec==1.3.2
Step #1 - "builder": oauthlib==2.1.0
Step #1 - "builder": mccabe==0.6.1
Step #1 - "builder": MarkupSafe==1.0
Step #1 - "builder": lxml==4.2.5
Step #1 - "builder": lazy-object-proxy==1.3.1
Step #1 - "builder": jmespath==0.9.3
Step #1 - "builder": Jinja2==2.10
Step #1 - "builder": itypes==1.1.0
Step #1 - "builder": isort==4.3.4
Step #1 - "builder": idna==2.7
Step #1 - "builder": docutils==0.14
Step #1 - "builder": djangorestframework-jwt==1.11.0
Step #1 - "builder": djangorestframework==3.8.2
Step #1 - "builder": django-rest-swagger==2.0.7
Step #1 - "builder": django-rest-auth==0.9.3
Step #1 - "builder": django-filter==2.0.0
Step #1 - "builder": django-allauth==0.36.0
Step #1 - "builder": Django==2.1
Step #1 - "builder": defusedxml==0.5.0
Step #1 - "builder": cryptography==2.4.2
Step #1 - "builder": coreschema==0.0.4
Step #1 - "builder": colorama==0.4.1
Step #1 - "builder": chardet==3.0.4
Step #1 - "builder": cffi==1.11.5
Step #1 - "builder": certifi==2018.8.13
Step #1 - "builder": botocore==1.12.55
Step #1 - "builder": boto3==1.9.55
Step #1 - "builder": astroid==2.1.0
Step #1 - "builder": INFO new_descriptor_contents: 
Step #1 - "builder": 
Step #1 - "builder": gunicorn
Step #1 - "builder": 
Step #1 - "builder": wrapt==1.10.11
Step #1 - "builder": virtualenv==16.0.0
Step #1 - "builder": urllib3==1.23
Step #1 - "builder": uritemplate==3.0.0
Step #1 - "builder": typed-ast==1.1.0
Step #1 - "builder": social-auth-core==2.0.0
Step #1 - "builder": social-auth-app-django==3.1.0
Step #1 - "builder": six==1.11.0
Step #1 - "builder": simplejson==3.16.0
Step #1 - "builder": s3transfer==0.1.13
Step #1 - "builder": requests-oauthlib==1.0.0
Step #1 - "builder": requests==2.19.1
Step #1 - "builder": pytz==2018.5
Step #1 - "builder": python3-openid==3.1.0
Step #1 - "builder": python-social-auth==0.3.6
Step #1 - "builder": python-dateutil==2.7.5
Step #1 - "builder": PyMySQL==0.9.2
Step #1 - "builder": pylint==2.2.2
Step #1 - "builder": PyJWT==1.6.4
Step #1 - "builder": pycparser==2.19
Step #1 - "builder": Pillow==5.3.0
Step #1 - "builder": openapi-codec==1.3.2
Step #1 - "builder": oauthlib==2.1.0
Step #1 - "builder": mccabe==0.6.1
Step #1 - "builder": MarkupSafe==1.0
Step #1 - "builder": lxml==4.2.5
Step #1 - "builder": lazy-object-proxy==1.3.1
Step #1 - "builder": jmespath==0.9.3
Step #1 - "builder": Jinja2==2.10
Step #1 - "builder": itypes==1.1.0
Step #1 - "builder": isort==4.3.4
Step #1 - "builder": idna==2.7
Step #1 - "builder": docutils==0.14
Step #1 - "builder": djangorestframework-jwt==1.11.0
Step #1 - "builder": djangorestframework==3.8.2
Step #1 - "builder": django-rest-swagger==2.0.7
Step #1 - "builder": django-rest-auth==0.9.3
Step #1 - "builder": django-filter==2.0.0
Step #1 - "builder": django-allauth==0.36.0
Step #1 - "builder": Django==2.1
Step #1 - "builder": defusedxml==0.5.0
Step #1 - "builder": cryptography==2.4.2
Step #1 - "builder": coreschema==0.0.4
Step #1 - "builder": colorama==0.4.1
Step #1 - "builder": chardet==3.0.4
Step #1 - "builder": cffi==1.11.5
Step #1 - "builder": certifi==2018.8.13
Step #1 - "builder": botocore==1.12.55
Step #1 - "builder": boto3==1.9.55
Step #1 - "builder": astroid==2.1.0
Step #1 - "builder": INFO descriptor_contents:
Step #1 - "builder": INFO starting: checking_cached_requirements.txt_layer
Step #1 - "builder": INFO checking_cached_interpreter_layer took 1 seconds
Step #1 - "builder": INFO [CACHE][HIT] v0.10.0:PYTHON (interpreter)->857ad57bf9cd453430b0abd26875a38ffddc81f8f6f24cacd8d232e721414cd2
Step #1 - "builder": INFO check python version took 0 seconds
Step #1 - "builder": 
Step #1 - "builder": INFO `python version` stderr:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO `python version` full cmd:
Step #1 - "builder": INFO starting: check python version
Step #1 - "builder": INFO {"architecture": "amd64", "author": "Bazel", "config": {}, "created": "2018-12-03T15:00:00Z", "env": "/env", "history": [{"author": "Bazel", "created": "1970-01-01T00:00:00Z", "created_by": "bazel build ..."}], "os": "linux", "rootfs": {"diff_ids": ["sha256:1e388551b9f8421969265b252263c9f4222e12ae6e6e840013a12e701f8ca2eb"]}}
Step #1 - "builder": INFO Found cached dependency layer for 857ad57bf9cd453430b0abd26875a38ffddc81f8f6f24cacd8d232e721414cd2
Step #1 - "builder": INFO Found cached base image: asia.gcr.io/e2isapjango/app-engine-tmp/build-cache/ttl-7d/python-cache:857ad57bf9cd453430b0abd26875a38ffddc81f8f6f24cacd8d232e721414cd2.
Step #1 - "builder": DEBUG Checking cache for cache_key 857ad57bf9cd453430b0abd26875a38ffddc81f8f6f24cacd8d232e721414cd2
Step #1 - "builder": INFO check python version took 0 seconds
Step #1 - "builder": 
Step #1 - "builder": INFO `python version` stderr:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO `python version` full cmd:
Step #1 - "builder": INFO starting: check python version
Step #1 - "builder": INFO starting: checking_cached_interpreter_layer
Step #1 - "builder": INFO starting: build process for FTL image
Step #1 - "builder": INFO builder initialization took 0 seconds
Step #1 - "builder": INFO Loading Docker credentials for repository 'asia.gcr.io/e2isapjango/app-engine-tmp/app/ttl-2h:b91b613d-04af-4bef-9bad-4c3d409c7ba4'
Step #1 - "builder": INFO Loading Docker credentials for repository 'gcr.io/gae-runtimes/python37:python37_3_7_1_20181112_RC01'
Step #1 - "builder": INFO starting: builder initialization
Step #1 - "builder": INFO starting: full build
Step #1 - "builder": INFO FTL arg passed: verbosity DEBUG
Step #1 - "builder": INFO FTL arg passed: additional_directory /.gaeconfig
Step #1 - "builder": INFO FTL arg passed: directory /workspace
Step #1 - "builder": INFO FTL arg passed: output_path None
Step #1 - "builder": INFO FTL arg passed: fail_on_error True
Step #1 - "builder": INFO FTL arg passed: upload True
Step #1 - "builder": INFO FTL arg passed: global_cache False
Step #1 - "builder": INFO FTL arg passed: name asia.gcr.io/e2isapjango/app-engine-tmp/app/ttl-2h:b91b613d-04af-4bef-9bad-4c3d409c7ba4
Step #1 - "builder": INFO FTL arg passed: venv_cmd /opt/python3.7/bin/python3.7 -m virtualenv
Step #1 - "builder": INFO FTL arg passed: cache_repository asia.gcr.io/e2isapjango/app-engine-tmp/build-cache/ttl-7d
Step #1 - "builder": INFO FTL arg passed: cache_salt 
Step #1 - "builder": INFO FTL arg passed: cache_key_version v0.10.0
Step #1 - "builder": INFO FTL arg passed: base gcr.io/gae-runtimes/python37:python37_3_7_1_20181112_RC01
Step #1 - "builder": INFO FTL arg passed: sh_c_prefix False
Step #1 - "builder": INFO FTL arg passed: destination_path /srv
Step #1 - "builder": INFO FTL arg passed: builder_output_path /builder/outputs
Step #1 - "builder": INFO FTL arg passed: tar_base_image_path None
Step #1 - "builder": INFO FTL arg passed: pip_cmd /env/bin/python3.7 -m pip
Step #1 - "builder": INFO FTL arg passed: exposed_ports None
Step #1 - "builder": INFO FTL arg passed: entrypoint /start
Step #1 - "builder": INFO FTL arg passed: venv_dir /env
Step #1 - "builder": INFO FTL arg passed: cache True
Step #1 - "builder": INFO FTL arg passed: python_cmd /opt/python3.7/bin/python3.7
Step #1 - "builder": INFO Beginning FTL build for python
Step #1 - "builder": INFO FTL version python-v0.10.0
Step #1 - "builder": 03 Dec 2018 16:05:22 INFO Executing ['/ftl-v0.10.0.par', '--name=asia.gcr.io/e2isapjango/app-engine-tmp/app/ttl-2h:b91b613d-04af-4bef-9bad-4c3d409c7ba4', '--destination=/srv', '--cache-repository=asia.gcr.io/e2isapjango/app-engine-tmp/build-cache/ttl-7d', '--cache', '--python-cmd=/opt/python3.7/bin/python3.7', '--pip-cmd=/env/bin/python3.7 -m pip', '--virtualenv-cmd=/opt/python3.7/bin/python3.7 -m virtualenv', '-v=DEBUG', '--base=gcr.io/gae-runtimes/python37:python37_3_7_1_20181112_RC01', '--entrypoint=/start', '--directory=/workspace', '--additional-directory=/.gaeconfig']
Step #1 - "builder": 03 Dec 2018 16:05:22 INFO Entrypoint: {'type': 'default'}
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 'w\x00r\x00a\x00p\x00t\x00=\x00=\x001\x00.\x001\x000\x00.\x001\x001\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 'v\x00i\x00r\x00t\x00u\x00a\x00l\x00e\x00n\x00v\x00=\x00=\x001\x006\x00.\x000\x00.\x000\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 'u\x00r\x00l\x00l\x00i\x00b\x003\x00=\x00=\x001\x00.\x002\x003\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 'u\x00r\x00i\x00t\x00e\x00m\x00p\x00l\x00a\x00t\x00e\x00=\x00=\x003\x00.\x000\x00.\x000\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 't\x00y\x00p\x00e\x00d\x00-\x00a\x00s\x00t\x00=\x00=\x001\x00.\x001\x00.\x000\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 's\x00o\x00c\x00i\x00a\x00l\x00-\x00a\x00u\x00t\x00h\x00-\x00c\x00o\x00r\x00e\x00=\x00=\x002\x00.\x000\x00.\x000\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 's\x00o\x00c\x00i\x00a\x00l\x00-\x00a\x00u\x00t\x00h\x00-\x00a\x00p\x00p\x00-\x00d\x00j\x00a\x00n\x00g\x00o\x00=\x00=\x003\x00.\x001\x00.\x000\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 's\x00i\x00x\x00=\x00=\x001\x00.\x001\x001\x00.\x000\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 's\x00i\x00m\x00p\x00l\x00e\x00j\x00s\x00o\x00n\x00=\x00=\x003\x00.\x001\x006\x00.\x000\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 's\x003\x00t\x00r\x00a\x00n\x00s\x00f\x00e\x00r\x00=\x00=\x000\x00.\x001\x00.\x001\x003\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 'r\x00e\x00q\x00u\x00e\x00s\x00t\x00s\x00-\x00o\x00a\x00u\x00t\x00h\x00l\x00i\x00b\x00=\x00=\x001\x00.\x000\x00.\x000\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 'r\x00e\x00q\x00u\x00e\x00s\x00t\x00s\x00=\x00=\x002\x00.\x001\x009\x00.\x001\x00\r\x00'
Step #1 - "builder": 03 Dec 2018 16:05:22 WARNING Failed to parse requirement: 'p\x00y\x00t\x00z\x00=\x00=\x002\x000\x001\x008\x00.\x005\x00\r\x00'
like image 562
Nic Avatar asked Dec 03 '18 07:12

Nic


2 Answers

It looks like your requirements.txt file is UTF-16 encoded:

>>> b'p\x00y\x00t\x00z\x00=\x00=\x002\x000\x001\x008\x00.\x005\x00\r\x00'.decode('utf-16')
'pytz==2018.5\r'

How did you create this file?

You can use this short script should re-encode the file correctly:

with open('requirements.txt', 'rb') as source_file:
    contents = source_file.read()

with open('requirements.txt', 'w+b') as dest_file:
    dest_file.write(contents.decode('utf-16').encode('utf-8'))
like image 75
Dustin Ingram Avatar answered Nov 01 '22 22:11

Dustin Ingram


For other people that arrive here where the above answer doesn't work for them. It could also be this issue documented in this post. Basically just remove pkg-resources==0.0.0 if it is included in your requirements.txt.

like image 31
Matt Goo Avatar answered Nov 01 '22 21:11

Matt Goo