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

cannot import name spawnu #211

Closed
wpbloger opened this issue Jun 29, 2015 · 2 comments
Closed

cannot import name spawnu #211

wpbloger opened this issue Jun 29, 2015 · 2 comments

Comments

@wpbloger
Copy link

Hello.

I updated version of the bulldozer and try to compile the application, and I'm having here such error:

Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 9, in
load_entry_point('buildozer==0.30.dev0', 'console_scripts', 'buildozer')()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/init.py", line 981, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/target.py", line 85, in run_commands
func(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/target.py", line 95, in cmd_debug
self.buildozer.prepare_for_build()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/init.py", line 162, in prepare_for_build
self.target.install_platform()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/targets/android.py", line 419, in install_platform
self._install_android_packages()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/targets/android.py", line 372, in _install_android_packages
self._android_update_sdk('tools,platform-tools')
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/targets/android.py", line 312, in _android_update_sdk
env={'JAVA_TOOL_OPTIONS': java_tool_options + ' -Dfile.encoding=UTF-8'})
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/init.py", line 341, in cmd_expect
from pexpect import spawnu
ImportError: cannot import name spawnu
How can I fix it?

@germantechie
Copy link

Firstly, you should not be using a dev package. In the logs, you can see you are using buildozer-0.30.dev
Use the stable version of buildozer 0.29. However, you would still encounter this issue.

Open the init.py file reported in the log - "/usr/local/lib/python2.7/dist-packages/buildozer-0.30.dev0-py2.7.egg/buildozer/__init.py" and go to line 341 to rename the class name of "spawnu" to just "spawn". Make sure you change the word at one more line down the same file.

It's a bug within buildozer.

@dessant
Copy link
Contributor

dessant commented Sep 24, 2015

@germantechie that is not a bug, spawnu is used intentionally. He most probably used -dev because it contains new fixes.

@wpbloger in case you haven't solved it yet, try upgrading pexpect, please reopen the issue if you still encounter the same problem.
https://stackoverflow.com/questions/30756691/importerror-cannot-import-name-spawnu-while-building-apk-using-kivy

@dessant dessant closed this as completed Sep 24, 2015
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

3 participants