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]: database is locked when running dashboard #651

Open
abrichr opened this issue May 3, 2024 · 0 comments
Open

[Bug]: database is locked when running dashboard #651

abrichr opened this issue May 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@abrichr
Copy link
Contributor

abrichr commented May 3, 2024

Describe the bug

When the dashboard is running, openadapt.record fails:

  File "/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
    self.dialect.do_execute(
    |    |       -> <function DefaultDialect.do_execute at 0x1370d63b0>
    |    -> <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x1373b4130>
    -> <sqlalchemy.engine.base.Connection object at 0x1565ba0b0>
  File "/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
    |      |       |          -> (1714746651.050399, 1512, 982, 0.5, 5.0, 'darwin', 'foo', None)
    |      |       -> 'INSERT INTO recording (timestamp, monitor_width, monitor_height, double_click_interval_seconds, double_click_distance_pixels...
    |      -> <method 'execute' of 'sqlite3.Cursor' objects>
    -> <sqlite3.Cursor object at 0x1565879c0>

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: INSERT INTO recording (timestamp, monitor_width, monitor_height, double_click_interval_seconds, double_click_distance_pixels, platform, task_description, video_start_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?)]
[parameters: (1714746651.050399, 1512, 982, 0.5, 5.0, 'darwin', 'foo', None)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

We would like to be able to create recordings using the tray icon or the command line while the dashboard is running.

To Reproduce

python -m openadapt.app.dashboard.run

In a separate shell:
python -m openadapt.record foo

@abrichr abrichr added the bug Something isn't working label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants