Error when syncing project.
@harminius is already working on this.
Since Nov 11, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 54/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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```
- Dominant language
- Python
- Stars
- 45
- Forks
- 21
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MerginMaps/qgis-plugin
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
MerginMaps/qgis-plugin#953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MerginMaps/qgis-plugin#848 · 1 comment ·
-
Project history and Remove locally fail in projects with long paths on Windows (> 260 characters)Openbug windows
Difficulty 3/5 1-2 days Newbie friendliness 55/100
MerginMaps/qgis-plugin#967 ·
-
View changes and schema check use the wrong base copy for GeoPackages in subfoldersPossibly taken @harminius claimed this 6 days ago. Openbug
MerginMaps/qgis-plugin#963 · 1 assignee ·
-
@mm_project_version is not updatedPossibly taken @harminius claimed this 20 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
MerginMaps/qgis-plugin#947 · 1 assignee ·
All issues in MerginMaps/qgis-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Deltares/numba_celltree#100 · 1 comment ·
-
auto-reported bug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
soup airgap-bundle --bundle-size-cap nan, inf or a cap above ~1.67e299 GiB stops with an internal ValueError/OverflowError (exit 1) instead of a usage errorPossibly taken @Keshemir claimed this today. Openbug claimed difficulty:2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MakazhanAlpamys/Soup#3045 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
dagster-io/skills#80 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day