Description
Opening the Changes viewer (history) for a project and clicking on a specific version throws a TypeError: 'sqlite3.Cursor' object does not support the context manager protocol. This issue is not project-specific — it was reproduced on other projects.
Environment
[x] Staging [ ] PROD
Application (+ app version, build, operating system)
- QGIS 3.44.7-Solothurn
- Mergin Maps Plugin build: d-137311
- macOS Tahoe 26.3
- Also reproduced on: QGIS 3.40.15-Bratislava, Windows 11 64-bit ARM
Steps to reproduce
- Open the Mergin Maps plugin in QGIS
- Open the Changes viewer (history) for project
tester-ws-1 / v2push_exploratory
- Click on version
v125
Actual results
Error is shown: TypeError: 'sqlite3.Cursor' object does not support the context manager protocol
Expected results
The selected version diff/changes should be displayed without error.
Screenshots or logs
An error has occurred while executing Python code:
TypeError: 'sqlite3.Cursor' object does not support the context manager protocol
Traceback (most recent call last):
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/version_viewer_dialog.py", line 587, in selected_version_changed
self.show_version_changes(version)
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/version_viewer_dialog.py", line 674, in show_version_changes
layers = make_version_changes_layers(QgsProject.instance().homePath(), version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/diff.py", line 406, in make_version_changes_layers
features = diff_table_to_features(diff[table_name], db_schema[table_name], fields, cols_to_fields, db_conn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/diff.py", line 237, in diff_table_to_features
db_row = get_row_from_db(db_conn, schema_table, entry_changes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/diff.py", line 78, in get_row_from_db
with db_conn.cursor() as c:
^^^^^^^^^^^^^^^^
TypeError: 'sqlite3.Cursor' object does not support the context manager protocol
Python version: 3.12.11 (main, Dec 18 2025, 07:47:48) [Clang 16.0.0 (clang-1600.0.26.6)]
QGIS version: 3.44.7-Solothurn Solothurn, 4edb1325
Python Path:
/Applications/QGIS.app/Contents/Resources/qgis/python
/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python
/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins
/Applications/QGIS.app/Contents/Resources/qgis/python/plugins
/Applications/QGIS.app/Contents/Frameworks/lib/python312.zip
/Applications/QGIS.app/Contents/Frameworks/lib/python3.12
/Applications/QGIS.app/Contents/Frameworks/lib/python3.12/lib-dynload
/Applications/QGIS.app/Contents/Frameworks/lib/python3.12/site-packages
/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python
.
/Users/rastoh/Documents/1_Projects/SSO_plugin_regression/v2push_exploratory
Conclusion
Created by Claude and supervised by a human test analyst.
Description
Opening the Changes viewer (history) for a project and clicking on a specific version throws a
TypeError: 'sqlite3.Cursor' object does not support the context manager protocol. This issue is not project-specific — it was reproduced on other projects.Environment
[x] Staging [ ] PROD
Application (+ app version, build, operating system)
Steps to reproduce
tester-ws-1 / v2push_exploratoryv125Actual results
Error is shown:
TypeError: 'sqlite3.Cursor' object does not support the context manager protocolExpected results
The selected version diff/changes should be displayed without error.
Screenshots or logs
Conclusion
Created by Claude and supervised by a human test analyst.