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

Failed to download project. due to an unhandled exception.

Open Tom-Telenova opened this issue 2 years ago • 6 comments

Hi, is there any way to overcome this issue when trying to download a project on QGIS? Thanks

Tom-Telenova avatar Jul 18 '22 09:07 Tom-Telenova

hi @Tom-Telenova we would need some traceback of the error

PeterPetrik avatar Aug 09 '22 07:08 PeterPetrik

Hi @PeterPetrik. Please see following:

Traceback (most recent call last):

  File "C:\Users/ThomasCarroll/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\sync_dialog.py", line 126, in download_timer_tick
    is_running = download_project_is_running(self.job)

  File "C:\Users/ThomasCarroll/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 187, in download_project_is_running
    raise future.exception()

  File "C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\concurrent\futures\thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)

  File "C:\Users/ThomasCarroll/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 92, in _do_download
    item.download_blocking(mc, mp, project_path)

  File "C:\Users/ThomasCarroll/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 302, in download_blocking
    save_to_file(resp, self.download_file_path)

  File "C:\Users/ThomasCarroll/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\utils.py", line 41, in save_to_file
    part = stream.read(4096)

  File "C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\http\client.py", line 455, in read
    n = self.readinto(b)

  File "C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\http\client.py", line 499, in readinto
    n = self.fp.readinto(b)

  File "C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\socket.py", line 704, in readinto
    return self._sock.recv_into(b)

  File "C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)

  File "C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)

ssl.SSLError: A failure in the SSL library occurred (_ssl.c:2633)

Tom-Telenova avatar Aug 11 '22 08:08 Tom-Telenova

Thanks, any change you are behind firewall or any corporate restriction to access our servers?

  • which windows version do you use?
  • which QGIS version do you use?
  • do you use latest Mergin Maps plugin?

PeterPetrik avatar Aug 11 '22 09:08 PeterPetrik

Hi,

It's Windows 10 QGIS 3.16.15 Mergin Plugin version is 2022.5

Tom-Telenova avatar Aug 11 '22 09:08 Tom-Telenova

We support only latest LTR and PR , so can you please try to update QGIS to Version 3.22.9 LTR and see if the error still persists?

PeterPetrik avatar Aug 11 '22 10:08 PeterPetrik

Hi Peter,

I've now got the QGIS Version 3.22.9 and getting the same error:

Traceback (most recent call last):

File "C:\Users/ThomasCarroll/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\sync_dialog.py", line 126, in download_timer_tick is_running = download_project_is_running(self.job)

File "C:\Users/ThomasCarroll/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 186, in download_project_is_running _cleanup_failed_download(job.directory, job.mp)

File "C:\Users/ThomasCarroll/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 106, in _cleanup_failed_download shutil.rmtree(directory)

File "C:\PROGRA~1\QGIS32~1.9\apps\Python39\lib\shutil.py", line 740, in rmtree return _rmtree_unsafe(path, onerror)

File "C:\PROGRA~1\QGIS32~1.9\apps\Python39\lib\shutil.py", line 613, in _rmtree_unsafe _rmtree_unsafe(fullname, onerror)

File "C:\PROGRA~1\QGIS32~1.9\apps\Python39\lib\shutil.py", line 613, in _rmtree_unsafe _rmtree_unsafe(fullname, onerror)

File "C:\PROGRA~1\QGIS32~1.9\apps\Python39\lib\shutil.py", line 618, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info())

File "C:\PROGRA~1\QGIS32~1.9\apps\Python39\lib\shutil.py", line 616, in _rmtree_unsafe os.unlink(fullname)

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\ThomasCarroll\Mergin Projects\Matlock for Survey\Matlock for Survey\photos\New_PMP\JPEG_20220803_102633_1213417574167841633.jpg.0'

Tom-Telenova avatar Aug 12 '22 09:08 Tom-Telenova