Setting a custom p4a source dir using a freshly cloned 'develop' branch and then building an APK results in a traceback mentioning an AttributeError:
Traceback (most recent call last):
File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 1231, in <module>
main()
File "/home/zedr/src/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 688, in __init__
getattr(self, command)(args)
File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 155, in wrapper_func
func(self, args, **kw)
File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 1099, in apk
output, build_args = self._build_package(args, package_type='apk')
File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 1000, in _build_package
build_args = build.parse_args_and_make_package(
AttributeError: module 'build' has no attribute 'parse_args_and_make_package'
The error does not occur if I use the master branch instead.
Command:
python3.7 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name letter_trail --name 'Letter Trail' --version 0.1.0 --package com.zedr.games.letter_trail --minsdk 21 --ndk-api 21 --private /home/zedr/src/trail/.buildozer/android/app --permission INTERNET --permission WAKE_LOCK --android-entrypoint org.kivy.android.PythonActivity --android-apptheme @android:style/Theme.NoTitleBar --orientation portrait --window --wakelock --copy-libs --local-recipes /home/zedr/src/trail/recipes --arch armeabi-v7a --color=always --storage-dir="/home/zedr/src/trail/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
Spec file:
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
p4a.source_dir = ~/src/python-for-android
That's an interesting one. I haven't played with this p4a.source_dir feature much.
Could you share the output of:
cd ~/src/python-for-android
git branch
git log -1
I'm not able to reproduce it anymore. Weird. Will reopen if it happens again. Thanks for your interest anyway.
I'm seeing this same error after cloning python-for-android and setting p4a.source_dir = ~/src/python-for-android in my buildozer.spec file.
```erik@erik-VirtualBox:~/Friendly-Fitness-App$ cd ~/src/python-for-android/
erik@erik-VirtualBox:~/src/python-for-android$ git branch
Merge pull request #2177 from AndreMiras/feature/release_documentation_update
Updates release documentation```
@Dirk-Sandberg could you share your complete build log?
Hmm... now it isn't happening. I was running into another error (not while setting the p4a source dir) related to not having libssl-dev installed. Error was
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
After I apt install libssl-dev, it appears that I've fixed both my errors (??).
OK thanks for sharing, same pattern as @zedr, the error disappeared the second build :thinking: :shrug:
Hmm... now it isn't happening. I was running into another error (_not_ while setting the p4a source dir) related to not having
libssl-devinstalled. Error waspip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
After I
apt install libssl-dev, it appears that I've fixed both my errors (??).
I second this with https://github.com/kivy/python-for-android/issues/2178
Hello, I get this same error, and I've just updated buildozer with buildozer android update while trying to troubleshoot another issue.
However, my problem didn't fix itself like in the previous comments! Also, I've never set any values for p4a.source_dir = and it used to work perfectly before the update.
My current Buildozer version: Buildozer 1.0.1-dev0
Now, whenever I run buildozer android release I get the following error:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module>
main()
File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__
getattr(self, command)(args)
File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 155, in wrapper_func
func(self, args, **kw)
File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1128, in apk
output, build_args = self._build_package(args, package_type='apk')
File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1029, in _build_package
build_args = build.parse_args_and_make_package(
AttributeError: module 'build' has no attribute 'parse_args_and_make_package'
Is there any way for me to go back to a stable version? It feels like I am breaking more stuff while trying to fix my problems.
Any help would be appreciated! thanks!
Hello, I get this same error, and I've just updated buildozer with
buildozer android updatewhile trying to troubleshoot another issue.However, my problem didn't fix itself like in the previous comments! Also, I've never set any values for
p4a.source_dir =and it used to work perfectly before the update.My current Buildozer version: Buildozer 1.0.1-dev0
Now, whenever I run
buildozer android releaseI get the following error:Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module> main() File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main ToolchainCL() File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__ getattr(self, command)(args) File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 155, in wrapper_func func(self, args, **kw) File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1128, in apk output, build_args = self._build_package(args, package_type='apk') File "/home/ark/git/gilbert/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1029, in _build_package build_args = build.parse_args_and_make_package( AttributeError: module 'build' has no attribute 'parse_args_and_make_package'Is there any way for me to go back to a stable version? It feels like I am breaking more stuff while trying to fix my problems.
Any help would be appreciated! thanks!
Hi, in case anybody is having the same problem: I fixed it by executing buildozer android clean and then buildozer android release again.
The build takes much longer now, and I do not know why it broke, or why this seems to fix it, but at least it is working now.
Most helpful comment
Hmm... now it isn't happening. I was running into another error (not while setting the p4a source dir) related to not having
libssl-devinstalled. Error wasAfter I
apt install libssl-dev, it appears that I've fixed both my errors (??).