ImportError: cannot import name 'BluetoothDispatcher' from 'able'
Enkumicahel opened this issue · 4 comments
Hello,
Using Buildozer to build my Kivy app with the ABLE library, but after following every instruction given in here, I get this at the end of the Bulldozer log.
python : ImportError: cannot import name 'BluetoothDispatcher' from 'able' (/data/user/0/org.test.bleable/files/app/_python_bundle/site-packages/able/init.pyc)
I have already included the following in my buildozer.spec file:
requirements = python3,kivy,android,able,lictionary,tatsu
p4a.local_recipes = ../recipes
what am I missing?
Hello,
Line p4a.local_recipes = ../recipes
assumes that that there is recipes directory one level above the build directory.
It could be checked by running ls ../recipes/able/
from the build directory.
Seems like in your case this directory was missed.
But, PyPi has package with the name able
- non related to this library. And this package was installed instead.
To fix the issue, you can change p4a.local_recipes
to point to the directory with the able recipe.
I thought so, but I tried to import the non-related PyPi able package to check if it exists but, it doesn't exist.
as for the ls ../recipes/able/
it returns the contents of the directory
To fix the issue, you can change p4a.local_recipes to point to the directory with the able recipe.
already done that.
lictionary,tatsu in requirements are PyPi package dependencies, so this library was involved.
One more way to check that wrong library was used, is by checking the output of the
ls ./.buildozer/android/platform/*/dists/*/_python_bundle/_python_bundle/site-packages/able
In case of able
-recipe this directory contains android
, and in case of PyPi library it contains grammar.ebnf
.
Maybe running buildozer android clean
before the next building attempt will help.
I think I am on the same page as you have mentioned above. But, now I was able to take the java interface and GATT implementation code and redesign my code to directly interact with that. So, I am good to go. Thank you!