Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Context' object has no attribute 'hostpython' #1077

Closed
rickbase1 opened this issue Jul 16, 2017 · 6 comments
Closed

AttributeError: 'Context' object has no attribute 'hostpython' #1077

rickbase1 opened this issue Jul 16, 2017 · 6 comments

Comments

@rickbase1
Copy link

rickbase1 commented Jul 16, 2017

#Still seems to be a problem. May be related to #1064

First attempt to deploy a simple kivy/python3 android app.
Linux kali-Alien 4.9.0-kali4-amd64 #1 SMP Debian 4.9.30-2kali1 (2017-06-22) x86_64 GNU/Linux

level 2 debug

[INFO]:    # Building recipes
[INFO]:    Building python2 for armeabi-v7a
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 905, in <module>
    main()
  File "/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 902, in main
    ToolchainCL()
  File "/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 508, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 190, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/build.py", line 565, in build_recipes
    recipe.build_arch(arch)
  File "/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py", line 44, in build_arch
    self.do_python_build(arch)
  File "/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py", line 73, in do_python_build
    shprint(sh.cp, self.ctx.hostpython, self.get_build_dir(arch.arch))
AttributeError: 'Context' object has no attribute 'hostpython'

 Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/build





@inclement
Copy link
Member

I'm not sure buildozer is actually using python-for-android master here. Would you be able to paste the contents of the file /home/rick/Desktop/osenergy/buildozer_tutorial/.buildozer/android/platform/python-for-android-master/pythonforandroid/graph.py?

@inclement
Copy link
Member

I'm fairly sure that buildozer is using the stable branch, which does not yet include the recipe graph fixes, so I'll close this issue. Feel free to reopen it if you believe buildozer is using the master branch (but it probably won't be unless you've manually changed that).

@rickbase1
Copy link
Author

rickbase1 commented Jul 16, 2017 via email

@inclement
Copy link
Member

Yep, this is definitely the old version of the module. Adding python2 in the requirements should totally resolve the issue until the fix is in the stable branch.

Thanks for the report!

@rickbase1
Copy link
Author

rickbase1 commented Jul 16, 2017 via email

@rickbase1
Copy link
Author

rickbase1 commented Jul 16, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants