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