flet icon indicating copy to clipboard operation
flet copied to clipboard

flet==0.25.0.dev3570 apk "Android" ImportError: dlopen failed: cannot locate symbol "sqlite3_blob_close" referenced by "/data/data/com.omamkaz.yemen_net/files/flet/python_bundle/modules/_sqlite3.cpython-312.so"...

Open osamalzabidi opened this issue 2 years ago • 2 comments

Duplicate Check

  • [X] I have searched the opened issues and there are no duplicates

Describe the bug

ImportError: dlopen failed: cannot locate symbol "sqlite3_blob_close" referenced by "/data/data/com.omamkaz.yemen_net/files/flet/python_bundle/modules/_sqlite3.cpython-312.so"...

Code sample

Code
import sqlite3
from pydal import DAL, Field
from datetime import datetime


class DBEngine:
    DB_PATH: str = ""
    db: DAL = None

    @classmethod
    def init_db(cls):
        cls.db = DAL(f'sqlite://{cls.DB_PATH}')

    @classmethod
    def init_tables(cls):
        try:
            cls.db.define_table(
                'users',
                ...
            )
            cls.db.commit()
        except sqlite3.OperationalError:
            pass

To reproduce

Traceback (most recent call last): File "", line 43, in File "", line 229, in run_module File "", line 88, in _run_code File "/data/user/0/com.omamkaz.yemen_net/files/flet/app/main.py", line 6, in from lib.views.app import Application File "/data/user/0/com.omamkaz.yemen_net/files/flet/app/lib/views/app.py", line 6, in from ..views.cards import Cards File "/data/user/0/com.omamkaz.yemen_net/files/flet/app/lib/views/cards.py", line 5, in from .card import Card, ADSLCard, LTECard, PhoneCard File "/data/user/0/com.omamkaz.yemen_net/files/flet/app/lib/views/card/init.py", line 4, in from .card import Card File "/data/user/0/com.omamkaz.yemen_net/files/flet/app/lib/views/card/card.py", line 10, in from ...models.user import User File "/data/user/0/com.omamkaz.yemen_net/files/flet/app/lib/models/user.py", line 4, in from .base import DBEngine File "/data/user/0/com.omamkaz.yemen_net/files/flet/app/lib/models/base.py", line 4, in import sqlite3 File "./sqlite3/init.py", line 57, in File "./sqlite3/dbapi2.py", line 27, in ImportError: dlopen failed: cannot locate symbol "sqlite3_blob_close" referenced by "/data/data/com.omamkaz.yemen_net/files/flet/python_bundle/modules/_sqlite3.cpython-312.so"...

Expected behavior

No response

Screenshots / Videos

Captures ![Screenshot_20241022-193650](https://github.com/user-attachments/assets/3e386ede-19f6-4219-bc81-eba0293bf469)

Operating System

Linux

Operating system details

ubuntu-latest

Flet version

0.25.0.dev3570

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

Maybe this error comes from python3.12 build configure or sqlite3 supporting!

Logs

Logs
[Paste your logs here]

Additional details

Previous Flet Version: 0.24.1, but this version doesn't have --split-per-abi future NOTE: This error shows when starting the app in "Android", so it comes after successfully compiling and deploying

osamalzabidi avatar Oct 22 '24 17:10 osamalzabidi

The issue has been fixed. Please re-build the app.

FeodorFitsner avatar Oct 23 '24 21:10 FeodorFitsner

Ready :), But still get some errors:

  1. Black Icon
  2. Window Destroy when I leave the app and come back
  3. assets/flutter_assets/app/app.zip, The source code is .py not .pyc!
  4. The application gets slow after this update!

Done, Thanks...

osamalzabidi avatar Oct 23 '24 23:10 osamalzabidi