Skip to content

[BUG] Windows path not support for sqlite #57

@Sun-ZhenXing

Description

@Sun-ZhenXing
DATABASE_PATH = os.path.abspath("./data/database.db") # not work
DATABASE_PATH = "./data/database.db"

mayim = Mayim(
    db_path=DATABASE_PATH,
)
Traceback (most recent call last):
  File "D:\workspace\repo\automate\qt-client\gl_ui\main_loop.py", line 72, in run
  File "D:\Program\Python3.10\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "D:\Program\Python3.10\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "D:\workspace\repo\automate\qt-client\gl_ui\main_loop.py", line 43, in main_loop
    mayim = Mayim(
  File "D:\workspace\repo\automate\qt-client\venv\lib\site-packages\mayim\mayim.py", line 99, in __init__
    pool = pool_type(dsn)
  File "D:\workspace\repo\automate\qt-client\venv\lib\site-packages\mayim\base\interface.py", line 108, in __init__
    self._populate_connection_args()
  File "D:\workspace\repo\automate\qt-client\venv\lib\site-packages\mayim\base\interface.py", line 123, in _populate_connection_args
    setattr(self, mapping.key, mapping.cast(value))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

The abspath just don't work for SQLite on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions