If a user deletes a GeoPackage layer file from the project directory on disk (e.g. Survey_points.gpkg) and then clicks Sync in Mergin Maps plugin, sync fails with a Python error and the UI cannot proceed. User must restart QGIS, reopen the project, and then the sync works.
An error has occurred while executing Python code:
Mergin.mergin.deps.pygeodiff.geodifflib.GeoDiffLibError: Error in schema: Missing 'base' file when opening sqlite driver: /Users/rastoh/Documents/1_Projects/SSO_plugin_regression/aaa_test_sync_120226/point.gpkg
Traceback (most recent call last):
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/plugin.py", line 481, in current_project_sync
self.manager.project_status(self.mergin_proj_dir)
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/projects_manager.py", line 249, in project_status
dlg = ProjectStatusDialog(
^^^^^^^^^^^^^^^^^^^^
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/project_status_dialog.py", line 109, in __init__
self.validate_project()
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/project_status_dialog.py", line 267, in validate_project
results = validator.run_checks()
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/validation.py", line 125, in run_checks
self.check_db_schema()
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/validation.py", line 287, in check_db_schema
has_change, msg = has_schema_change(self.mp, layer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/utils.py", line 1125, in has_schema_change
local_schema = get_schema(local_path)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/utils.py", line 1101, in get_schema
geodiff.schema("sqlite", "", layer_path, tmp_file.name)
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/mergin/deps/pygeodiff/main.py", line 368, in schema
return self.clib.schema(driver, driver_info, src, json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/mergin/deps/pygeodiff/geodifflib.py", line 567, in schema
self._parse_return_code(res, "schema")
File "/Users/rastoh/Library/Application Support/QGIS/QGIS3/profiles/Rasto Lutra/python/plugins/Mergin/mergin/deps/pygeodiff/geodifflib.py", line 172, in _parse_return_code
raise GeoDiffLibError(msg)
Mergin.mergin.deps.pygeodiff.geodifflib.GeoDiffLibError: Error in schema:
Missing 'base' file when opening sqlite driver: /Users/rastoh/Documents/1_Projects/SSO_plugin_regression/aaa_test_sync_120226/point.gpkg
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/aaa_test_sync_120226
Description
If a user deletes a GeoPackage layer file from the project directory on disk (e.g.
Survey_points.gpkg) and then clicks Sync in Mergin Maps plugin, sync fails with a Python error and the UI cannot proceed. User must restart QGIS, reopen the project, and then the sync works.Environment
Staging/PROD
Application (+ app version, build, operating system)
Steps to reproduce
Actual results
Expected results
Screenshots or logs
Conclusion
Created by GitHub Copilot and supervised by a human test analyst.