Closed edwit1971 closed 4 years ago
Could this be an example of #2178 ?
try sudo apt install libssl-dev
Now documented https://buildozer.readthedocs.io/en/latest/installation.html#android-on-ubuntu-20-04-64bit
I tried sudo pacman -S libssl-dev but it said target not found: libssl-dev I googled it and for Manjaro it told me to try openSSL so I did. I typed sudo pacman -S openssl and tried buildozer again but got the same error.
you might need to clean and rebuild
rm -rf .buildozer
buildozer android debug
Whenever I get stubborn Buildozer errors the first thing i always do is DELETE the hidden .buildozer folder and run buildozer again as a clean rebuild. I've done 2 clean rebuilds and this error still occurs. Are other people able to build APKs with buildozer putting matplotlib in the requirements line of the Buildozer.spec file? If i remove matplotlib from the Requirements line, it builds the APK without any errors but of course matplotlib code doesn't work on the android device.
matplotlib builds here (Ubuntu), so I suggest the issue is somthing about the configuration there.
A quick search shows https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip is a dependancy of matplotlib.
Other sites presumably download ok, so the question is why does the system there get a "urllib.error.HTTPError: HTTP Error 403: Forbidden" from this one site ? To narrow the issue does your web browser download this file?
The ssl stuff changed so that was a possibility, even though the message was not explicitly ssl. I have no other suggestions.
Yes my web-browser downloaded the file fine, no problem... (I wonder if I can use the file I downloaded to build the APK)
https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip
no solution...
I opened a better issue about this bug with code that is public and can be debugged by anyone with the ability to step through python-4-android or buildozer code to find why MatPlotLib is throwing a fatal error and not building.
I believe this is a BUG. Below is the output when I tried to build an APK with Buildozer. It was working fine just 2 months ago. I disabled MatPlotLib for the last few weeks and when I added it back suddenly I get an Error.
[INFO]: Prebuilding matplotlib for armeabi-v7a [INFO]: Downloading jquery-ui for matplatlib web backend [INFO]: Will download into /home/edwit3/Dev/WeightLoss/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/matplotlib/armeabi-v7andk_target_21/matplotlib/p4a_files [INFO]: Downloading matplotlib from https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip Traceback (most recent call last): File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1266, in
main()
File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 715, in init
getattr(self, command)(args)
File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 215, in build_dist_from_args
args, "ignore_setup_py", False
File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 571, in build_recipes
recipe.prebuild_arch(arch)
File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/matplotlib/ init.py", line 104, in prebuild_arch
self.download_web_backend_dependencies(arch)
File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/matplotlib/init__.py", line 93, in download_web_backend_dependencies
self.download_file(url, target_file)
File "/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 196, in download_file
urlretrieve(url, target, report_hook)
File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/urllib/request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/urllib/request.py", line 569, in error
return self._call_chain(args)
File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(args)
File "/home/edwit3/anaconda3/envs/myenv/lib/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
Download failed retrying in a second...Download failed retrying in a second...Download failed retrying in a second...Download failed retrying in a second...# Command failed: /home/edwit3/anaconda3/envs/myenv/bin/python -m pythonforandroid.toolchain create --dist_name=weightloss --bootstrap=sdl2 --requirements=python3==3.7.6,hostpython3==3.7.6,sqlite3,matplotlib,android,kivy==1.11.1,git+https://github.com/HeaTTheatR/KivyMD.git,pygments --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/edwit3/Dev/WeightLoss/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
Checklist
p4a.branch = develop
)Versions
Description
I'm using buildozer to make an APK buildozer -v android debug
and am getting an ERROR because I added MatPlotLib to the Spec file.
buildozer.spec
Command:
Spec file:
Logs