Buildozer Very long import statement cause failure with loading module

131 Views Asked by At

I have a very large Kivy project. The project is divided to many modules so it is common to find something like that in my code:

from A.B.C.D.E.F.G.H.I.J.K.L.M.N import P

The project runs perfectly with python3.8 in Pycharm, but when i build it using buildozer and run it on my android device, it crushes with the error:

I python : ModuleNotFoundError : no module name

Suspecting it has something to do with the very long import statement i ran a few checks and found that ipython cannot import a module if it has more than 12 parent packages.

All my attempts to somehow break the import statement to multiple imports such as:

from A.B.C.D.E.F.G import H
from H.I.J.K.L.M.N import P

didn't work.

It will make a huge mess to start reducing the packages amount.

Any suggestions?

1

There are 1 best solutions below

0
On

try this solution .import everything then get your module then remove the rest

import A
P=A.B.C.D.E.F.G.H.I.J.K.L.M.N.P
del A