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

Client fails to pull on windows (when installed from pip) #114

Open
wonder-sk opened this issue Nov 23, 2021 · 2 comments
Open

Client fails to pull on windows (when installed from pip) #114

wonder-sk opened this issue Nov 23, 2021 · 2 comments
Labels
bug Something isn't working windows

Comments

@wonder-sk
Copy link
Contributor

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
@wonder-sk wonder-sk added bug Something isn't working windows labels Nov 23, 2021
@wonder-sk
Copy link
Contributor Author

It looks like adding sqlite3 module import fixes the issue:

import sqlite3

@PeterPetrik
Copy link
Contributor

could be related also that we shipped sqlite without tree, see MerginMaps/geodiff#167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

2 participants