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

Unhandled exception when calculating changes of removed GeoPackage #591

Open
tomasMizera opened this issue Jun 14, 2024 · 0 comments
Open
Labels
bug Something isn't working sync Related to synchronisation of projects

Comments

@tomasMizera
Copy link
Contributor

  • Open any project with a .gpkg layer
  • Remove the .gpkg file from disk
  • Click the sync button
    • 💥
Screenshot 2024-06-14 at 19 32 03

Stack trace:

An error has occurred while executing Python code: 

Mergin.mergin.deps.pygeodiff.geodifflib.GeoDiffLibError: schema 
Traceback (most recent call last):
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/plugin.py", line 461, in current_project_sync
    self.manager.project_status(self.mergin_proj_dir)
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/projects_manager.py", line 179, in project_status
    dlg = ProjectStatusDialog(
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/project_status_dialog.py", line 92, in __init__
    self.validate_project()
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/project_status_dialog.py", line 246, in validate_project
    results = validator.run_checks()
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/validation.py", line 117, in run_checks
    self.check_db_schema()
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/validation.py", line 266, in check_db_schema
    has_change, msg = has_schema_change(self.mp, layer)
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/utils.py", line 1121, in has_schema_change
    local_schema = get_schema(local_path)
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/utils.py", line 1097, in get_schema
    geodiff.schema("sqlite", "", layer_path, tmp_file.name)
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/deps/pygeodiff/main.py", line 367, in schema
    return self.clib.schema(driver, driver_info, src, json)
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/deps/pygeodiff/geodifflib.py", line 558, in schema
    _parse_return_code(res, "schema")
  File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/deps/pygeodiff/geodifflib.py", line 45, in _parse_return_code
    raise GeoDiffLibError(msg)
Mergin.mergin.deps.pygeodiff.geodifflib.GeoDiffLibError: schema


Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] 
QGIS version: 3.36.3-Maidenhead Maidenhead, 2df9655469b 

Python Path:
/Applications/QGIS.app/Contents/MacOS/../Resources/python
/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python39.zip
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python
.
/Users/tomasmizera/qgis/projects/dev/city_survey
@tomasMizera tomasMizera added bug Something isn't working sync Related to synchronisation of projects labels Jun 14, 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 sync Related to synchronisation of projects
Projects
None yet
Development

No branches or pull requests

1 participant