MerginMaps / MerginMaps/python-api-client
Client fails to pull on windows (when installed from pip)
未关闭
还没有人认领这个 Issue。
bug
windows
- 主要语言
- Python
- 星标
- 23
- 派生
- 12
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 7
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 client.py:546 和 client_pull.py:553 开始,然后检查 client-log.txt 以查找 GEODIFF 扩展错误。复现 issue 中描述的已安装 pip 的 Windows 工作流,并跟踪 GeoPackage pull 步骤。当 pull_project 能够针对已更改的 GeoPackage 完成,且不再出现报告的 ClientError 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, sqlite
- 领域
- databases, operating-systems
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100