Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

new 0.8 version for sqlite connection with '?mode=ro' not working, Error can't open database #585

Description

@Pythonbeginer2014
from contextlib import asynccontextmanager
from databases import Database


@asynccontextmanager
async def async_sqlite_conn(db_name):
    database = Database(f'sqlite+aiosqlite:///example.db?mode=ro', uri=True)
    try:
        await database.connect()
        yield database
    finally:
        await database.disconnect()

when call this function and query data, get error " can't open database"

Thanks ,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions