MerginMaps / MerginMaps/python-api-client
Client fails to pull on windows (when installed from pip)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23
- Forks
- 12
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
When using the client on Windows outside of QGIS (e.g. installed through pip), it does not work correctly when trying to pull a new version that involves geodiff operations:
import mergin
client = mergin.MerginClient (login='john', password='topsecret')
client.download_project('john/project', 'C:/Data/Project')
# now do some modifications to a GeoPackage on the server
client.pull_project('C:/Data/Project')
It fails with the following traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\XYZ\AppData\Roaming\Python\Python38\site-packages\mergin\client.py", line 546, in pull_project
return pull_project_finalize(job)
File "C:\Users\XYZ\AppData\Roaming\Python\Python38\site-packages\mergin\client_pull.py", line 553, in pull_project_finalize
raise ClientError("Cannot patch basefile {}! Please try syncing again.".format(basefile))
mergin.common.ClientError: Cannot patch basefile C:\Data\Project\.mergin\test.gpkg! Please try syncing again.
It looks like the underlying issue is in geodiff as client-log.txt contains this error:
GEODIFF: Unable to enable sqlite3/gpkg extensions
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 client.py:546 and client_pull.py:553, then inspect client-log.txt for the GEODIFF extension error. Reproduce the pip-installed Windows workflow described in the issue and trace the GeoPackage pull step. Done means pull_project completes for a changed GeoPackage without the reported ClientError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- databases, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100