Buildozer stopped working all of a sudden despite always uploading the same files to Colab

Question:

Check application requirements
Compile platform
Run ‘/usr/bin/python3 -m pythonforandroid.toolchain create –dist_name=demo3 –bootstrap=sdl2 –requirements=python3,kivy,pillow,kivymd,asyncio,bleak –arch armeabi-v7a –copy-libs –color=always –storage-dir="/content/.buildozer/android/platform/build-armeabi-v7a" –ndk-api=21 –ignore-setup-py –debug’
Cwd /content/.buildozer/android/platform/python-for-android

[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI: 27
[INFO]: Available Android APIs are (27)
[INFO]: Requested API target 27 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK: /root/.buildozer/android/platform/android-ndk-r19c
[INFO]: Found NDK version 19c
[INFO]: Getting NDK API version (i.e. minimum supported API) from user argument

Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1294, in
main()
File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 728, in init
getattr(self, command)(args)
File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 144, in wrapper_func
user_ndk_api=self.ndk_api)
File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 423, in prepare_build_environment
self.ccache = sh.which("ccache")
File "/usr/local/lib/python3.7/dist-packages/sh-1.14.3-py3.7.egg/sh.py", line 1524, in call
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/local/lib/python3.7/dist-packages/sh-1.14.3-py3.7.egg/sh.py", line 788, in init
self.wait()
File "/usr/local/lib/python3.7/dist-packages/sh-1.14.3-py3.7.egg/sh.py", line 845, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.7/dist-packages/sh-1.14.3-py3.7.egg/sh.py", line 869, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:

RAN: /usr/bin/which ccache

STDOUT:

STDERR:

Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create –dist_name=demo3 –bootstrap=sdl2 –requirements=python3,kivy,pillow,kivymd,asyncio,bleak –arch armeabi-v7a –copy-libs –color=always –storage-dir="/content/.buildozer/android/platform/build-armeabi-v7a" –ndk-api=21 –ignore-setup-py –debug

ENVIRONMENT:
CUDNN_VERSION = ‘8.0.5.39’
PYDEVD_USE_FRAME_EVAL = ‘NO’
LD_LIBRARY_PATH = ‘/usr/local/nvidia/lib:/usr/local/nvidia/lib64’
CLOUDSDK_PYTHON = ‘python3’
LANG = ‘en_US.UTF-8’
ENABLE_DIRECTORYPREFETCHER = ‘1’
HOSTNAME = ‘ca63256296ed’
OLDPWD = ‘/’
CLOUDSDK_CONFIG = ‘/content/.config’
USE_AUTH_EPHEM = ‘1’
NVIDIA_VISIBLE_DEVICES = ‘all’
DATALAB_SETTINGS_OVERRIDES = ‘{"kernelManagerProxyPort":6000,"kernelManagerProxyHost":"172.28.0.3","jupyterArgs":["–ip=172.28.0.2"],"debugAdapterMultiplexerPath":"/usr/local/bin/dap_multiplexer","enableLsp":true}’
ENV = ‘/root/.bashrc’
PAGER = ‘cat’
NCCL_VERSION = ‘2.7.8’
TF_FORCE_GPU_ALLOW_GROWTH = ‘true’
JPY_PARENT_PID = ’41’
NO_GCE_CHECK = ‘False’
PWD = ‘/content’
HOME = ‘/root’
LAST_FORCED_REBUILD = ‘20220712’
CLICOLOR = ‘1’
DEBIAN_FRONTEND = ‘noninteractive’
LIBRARY_PATH = ‘/usr/local/cuda/lib64/stubs’
GCE_METADATA_TIMEOUT = ‘3’
GLIBCPP_FORCE_NEW = ‘1’
TBE_CREDS_ADDR = ‘172.28.0.1:8008’
TERM = ‘xterm-color’
SHELL = ‘/bin/bash’
GCS_READ_CACHE_BLOCK_SIZE_MB = ’16’
PYTHONWARNINGS = ‘ignore:::pip._internal.cli.base_command’
MPLBACKEND = ‘module://ipykernel.pylab.backend_inline’
CUDA_VERSION = ‘11.1.1’
NVIDIA_DRIVER_CAPABILITIES = ‘compute,utility’
SHLVL = ‘1’
PYTHONPATH = ‘/env/python’
NVIDIA_REQUIRE_CUDA = (‘cuda>=11.1 brand=tesla,driver>=418,driver<419 ‘
‘brand=tesla,driver>=440,driver<441 brand=tesla,driver>=450,driver<451’)
TBE_EPHEM_CREDS_ADDR = ‘172.28.0.1:8009’
COLAB_GPU = ‘0’
GLIBCXX_FORCE_NEW = ‘1’
PATH = ‘/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin’
LD_PRELOAD = ‘/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4’
GIT_PAGER = ‘cat’
_ = ‘/usr/local/bin/buildozer’
PACKAGES_PATH = ‘/root/.buildozer/android/packages’
ANDROIDSDK = ‘/root/.buildozer/android/platform/android-sdk’
ANDROIDNDK = ‘/root/.buildozer/android/platform/android-ndk-r19c’
ANDROIDAPI = ’27’
ANDROIDMINAPI = ’21’

Buildozer failed to execute the last command
The error might be hidden in the log above this error
Please read the full log, and search for it before
raising an issue with buildozer itself.
In case of a bug report, please add a full log with log_level = 2

Asked By: Egidio92

||

Answers:

There is a problem with the python-for-android build.py file which they currently fixing(something related to sh, and shoudl be fixed soon)
meanwhile as a workaround it is suggested to uncomment p4a.branch = master in the buildozer spec file and change the "master" to "develop"

Answered By: Dmitry H

After editing the p4a.branch to develop I get a "ValueError: read of closed file"

Answered By: Inyeni Showers

ValueError: read of closed file

Answered By: Rodrigo Quiles
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.