Error when syncing project.

オープン
#960 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@harminius がすでに取り組んでいます。

2026年11月11日 から。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

The traceback points to mergin/merginproject.py in inspect_files() and mergin/utils.py in generate_checksum(). Start by tracing how a mistakenly opened TIFF is included in the files inspected during sync, then reproduce the error and identify which file read fails. Done means syncing recovers without requiring the local project to be deleted and downloaded again.

索引モデルが issue の本文から書いたものです。

説明

If I accidentally open a tiff file from a Mergin project (in the sidebar) instead of the project file and then I try to open the project file and try to do a sync, I get the following error and the project cannot be synced anymore, I have to delete the local project and redownload it.


OSError: [Errno 22] Invalid argument 
Traceback (most recent call last):
  File "C:\Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python/plugins\Mergin\plugin.py", line 484, in current_project_sync
    self.manager.project_status(self.mergin_proj_dir)
  File "C:\Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python/plugins\Mergin\projects_manager.py", line 256, in project_status
    pull_changes, push_changes, push_changes_summary = self.mc.project_status(project_dir)
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python/plugins\Mergin\mergin\client.py", line 1162, in project_status
    push_changes = mp.get_push_changes()
                   ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python/plugins\Mergin\mergin\merginproject.py", line 658, in get_push_changes
    changes = self.compare_file_sets(self.files(), self.inspect_files())
                                                   ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python/plugins\Mergin\mergin\merginproject.py", line 324, in inspect_files
    "checksum": generate_checksum(abs_path),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python/plugins\Mergin\mergin\utils.py", line 26, in generate_checksum
    chunk = f.read(chunk_size)
            ^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument


Versão do Python: 3.12.14 (main, Aug 19 2026, 09:39:31) [MSC v.1944 64 bit (AMD64)] 
Versão do QGIS: 3.44.13-Solothurn Solothurn, 2c8a7782a96 

Caminho do Python:
C:/OSGeo4W/apps/qgis-ltr/./python
C:/Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python
C:/Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python/plugins
C:/OSGeo4W/apps/qgis-ltr/./python/plugins
C:\OSGeo4W\bin\python312.zip
C:\OSGeo4W\apps\Python312\DLLs
C:\OSGeo4W\apps\Python312\Lib
C:\OSGeo4W\bin
C:\OSGeo4W\apps\Python312
C:\OSGeo4W\apps\Python312\Lib\site-packages
C:\OSGeo4W\apps\Python312\Lib\site-packages\win32
C:\OSGeo4W\apps\Python312\Lib\site-packages\win32\lib
C:\OSGeo4W\apps\Python312\Lib\site-packages\Pythonwin
C:/Users/adrianearaujo/AppData/Roaming/QGIS/QGIS3\profiles\adriane/python
C:\Users\adrianearaujo\AppData\Roaming\QGIS\QGIS3\profiles\adriane\python\plugins\Mergin\mergin\deps\click-8.1.3-py3-none-any.whl
C:\Users\adrianearaujo\AppData\Roaming\QGIS\QGIS3\profiles\adriane\python\plugins\Mergin\mergin\deps\pygeodiff
C:\Users\adrianearaujo\AppData\Roaming\QGIS\QGIS3\profiles\adriane\python\plugins\Mergin\mergin\deps\python_dateutil-2.8.2-py2.py3-none-any.whl
C:\Users\adrianearaujo\AppData\Roaming\QGIS\QGIS3\profiles\adriane\python\plugins\Mergin\mergin\deps\pytz-2022.1-py2.py3-none-any.whl
C:\Users\adrianearaujo\AppData\Roaming\QGIS\QGIS3\profiles\adriane\python\plugins\Mergin\mergin\deps\six-1.17.0-py2.py3-none-any.whl
C:\Users\adrianearaujo\AppData\Roaming\QGIS\QGIS3\profiles\adriane\python\plugins\Mergin\mergin\deps\truststore-0.10.4-py3-none-any.whl
C:\Users\adrianearaujo\AppData\Roaming\QGIS\QGIS3\profiles\adriane\python\plugins\Mergin\mergin\deps\__init__.py
C:\Users\adrianearaujo\AppData\Roaming\QGIS\QGIS3\profiles\adriane\python\plugins\Mergin\mergin\deps\__pycache__
E:/MerginMaps/Macae_Malvinas_010/macae_os2624010_fisico_tab10```
主要言語
Python
スター
45
フォーク
21
平均マージ
3日 13時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MerginMaps/qgis-plugin のほかの issue

MerginMaps/qgis-plugin の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。