qgis-plugin icon indicating copy to clipboard operation
qgis-plugin copied to clipboard

Failed to sync project due to an unhandled exception.

Open ulfboge opened this issue 1 year ago • 1 comments

Dear Mergin Maps,

This happened when I tried to sync the project with QGIS after updates had been made in the field:

Traceback (most recent call last):

File "C:\Users/galag/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\sync_dialog.py", line 290, in pull_timer_tick self.pull_conflicts = pull_project_finalize(self.job) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users/galag/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 639, in pull_project_finalize shutil.rmtree(job.temp_dir)

File "C:\OSGeo4W\apps\Python312\Lib\shutil.py", line 781, in rmtree return _rmtree_unsafe(path, onexc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\shutil.py", line 639, in _rmtree_unsafe onexc(os.rmdir, path, err)

File "C:\OSGeo4W\apps\Python312\Lib\shutil.py", line 637, in _rmtree_unsafe os.rmdir(path)

PermissionError: [WinError 5] Access is denied: 'C:\Users\galag\KAYA Climate Solutions GmbH\Climate Office - Documents\General\Map projects\Rupa\fire-survey\fire-survey\.mergin\fetch_v32-v33'

Kind regards, Johan

ulfboge avatar Oct 04 '24 07:10 ulfboge

I think that could be the same error as #613 and I couldn't pin down the issue

Does that folder is in some onedrive/dropbox/google drive - synced folder that could be the issue?

Otherwise if you are allow to share the project, do you think you could :

  • share the Mergin project with me - my mergin username is "ValentinB_lutra" (reader permission would be enough) - https://help.cloudmergin.com/sharing-project
  • zip the folder with your data (content of C:\Users\galag\KAYA Climate Solutions GmbH\Climate Office - Documents\General\Map projects\Rupa\fire-survey\fire-survey folder) and send it to me for further analysis: valentin dot buira at lutraconsulting dot co dot uk

ValentinBuira avatar Oct 04 '24 11:10 ValentinBuira

HI Mergin Maps

I received the same error message on a project that had had nothing added to it for more than a year. During this inactive period I had explored the options of displaying different layers on my phone app and I was then unable to restore one of the layers so that it displayed as I usually have it displayed. The error message when I tried to sync my (correctly displaying) computer copy with the cloud was: Traceback (most recent call last):

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\merginproject.py", line 438, in apply_pull_changes self.geodiff.rebase(basefile, src, dest, rebase_conflicts)

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\deps\pygeodiff\main.py", line 105, in rebase return self.clib.rebase(base, modified_their, modified, conflict)

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\deps\pygeodiff\geodifflib.py", line 240, in rebase _parse_return_code(res, "rebase")

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\deps\pygeodiff\geodifflib.py", line 41, in _parse_return_code raise GeoDiffLibError(msg)

Mergin.mergin.deps.pygeodiff.geodifflib.GeoDiffLibError: rebase

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\sync_dialog.py", line 306, in pull_timer_tick self.pull_conflicts = pull_project_finalize(self.job)

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 555, in pull_project_finalize conflicts = job.mp.apply_pull_changes(job.pull_changes, job.temp_dir)

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\merginproject.py", line 445, in apply_pull_changes self.geodiff.make_copy_sqlite(f_conflict_file, dest)

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\deps\pygeodiff\main.py", line 221, in make_copy_sqlite return self.clib.make_copy_sqlite(src, dst)

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\deps\pygeodiff\geodifflib.py", line 328, in make_copy_sqlite _parse_return_code(res, "make_copy_sqlite")

File "C:\Users/gregp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\deps\pygeodiff\geodifflib.py", line 41, in _parse_return_code raise GeoDiffLibError(msg)

Mergin.mergin.deps.pygeodiff.geodifflib.GeoDiffLibError: make_copy_sqlite

greg-parry10 avatar Nov 17 '24 21:11 greg-parry10

Hi everyone, we've made several updates to the sync process, please reach out to our support team at [email protected] if you still have issues. Thank you for the report!

tomasMizera avatar Aug 27 '25 09:08 tomasMizera