Error when syncing project.

Đang mở
#960 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

@harminius đang làm issue này rồi.

Từ ngày 11/11/2026.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
54/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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```
Ngôn ngữ chính
Python
Star
45
Fork
21
Merge trung bình
3 ngày 13 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MerginMaps/qgis-plugin

Tất cả issue của MerginMaps/qgis-plugin

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.