MerginMaps / MerginMaps/qgis-plugin
unable to create a diff between two versions in the QGIS plugin
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44
- Forks
- 20
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 5
Description
- I have created a simple project with 1 survey layer
- synchronized new version V2. in which I have added 3 new points
- synchronized new version V3. in which I have updated 1 point (from the previous version), deleted 1 point (from the previous version), added 1 new point
- I tried to create a difference between these two versions as described in this test
However, after I pressed "run" I got this error
Here is the error in text form:
Traceback (most recent call last):
File "/Users/patrikmizera/Library/Application Support/QGIS/QGIS3/profiles/test01/python/plugins/Mergin/processing/algs/create_diff.py", line 149, in processAlgorithm
features = diff_table_to_features(diff[table_name], db_schema[table_name], fields, fields_mapping, db_conn)
File "/Users/patrikmizera/Library/Application Support/QGIS/QGIS3/profiles/test01/python/plugins/Mergin/diff.py", line 231, in diff_table_to_features
wkb_with_gpkg_hdr = base64.decodebytes(value.encode("ascii"))
AttributeError: 'NoneType' object has no attribute 'encode'
Execution failed after 1.53 seconds
Present in:
dev plugin with dev server
production plugin with production server
Mergin plugin artefact: https://github.com/MerginMaps/qgis-plugin/actions/runs/9482639845
Tested on MAC against app.dev (2024.4.0)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with processing/algs/create_diff.py at processAlgorithm and diff.py at diff_table_to_features, then reproduce the two-version diff using the steps and traceback in the issue. Inspect the value passed to base64.decodebytes and verify the diff completes for the added, updated, and deleted points without the reported AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100