Search code examples
python-2.7apkkivypsycopg2importerror

ImportError: dlopen failed: cannot locate symbol "floor" referenced by "_psycopg.so"


LogCat

ImportError: dlopen failed: cannot locate symbol "floor" referenced by "_psycopg.so"(.PNG)

Requirements: kivy, psycopg2

I still dont know what I am doing wrong, pls help I really want to fix this. I did an apk with buildozer, I have been solving a lot of problems, but I don't get this. I can't find it with google, and the only thing that I have found is not even relacionated with apk or psycopg2. I really need help.


Solution

  • I solved this, changing the psycopg2 with sqlite. Using a dinamic db, next to the main.py.

    buildozer.py


    source.include_exts = py,png,jpg,kv,atlas,db,ttf
    requirements = kivy,sqlite3
    

    db.py


    import os
    
    self.patch = os.path.dirname(os.path.abspath(__file__))
    db = self.patch + '/databases/android.db'