Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Windows path not support for sqlite #57

Open
Sun-ZhenXing opened this issue Jan 4, 2024 · 0 comments
Open

[BUG] Windows path not support for sqlite #57

Sun-ZhenXing opened this issue Jan 4, 2024 · 0 comments

Comments

@Sun-ZhenXing
Copy link

Sun-ZhenXing commented Jan 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant