nens / ThreeDiToolbox

Plugin for working with 3Di models in QGIS
GNU General Public License v3.0
7 stars 4 forks source link

Python error when updating 3Di Results Analysis #992

Closed leendertvanwolfswinkel closed 3 months ago

leendertvanwolfswinkel commented 4 months ago

When I update to the newest version, I get this error:

Couldn't load plugin 'threedi_results_analysis' 

PermissionError: [Errno 13] Permission denied: 'C:\\Users\\leendert.vanwolfswin\\AppData\\Roaming\\3Di\\QGIS3\\profiles\\default\\python\\plugins\\threedi_results_analysis\\deps\\.\\h5py\\h5ac.cp39-win_amd64.pyd' 
Traceback (most recent call last):
  File "C:\PROGRA~1/3DIMOD~1.28/apps/qgis-ltr/./python\qgis\utils.py", line 401, in loadPlugin
    __import__(packageName)
  File "C:\PROGRA~1/3DIMOD~1.28/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\__init__.py", line 57, in 
    dependencies.ensure_everything_installed()
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\dependencies.py", line 149, in ensure_everything_installed
    if not _ensure_h5py_installed():
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\dependencies.py", line 233, in _ensure_h5py_installed
    return _install_h5py(hdf5_version)
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\dependencies.py", line 252, in _install_h5py
    _install_dependencies([H5PY_DEPENDENCY], target_dir=_dependencies_target_dir())
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\dependencies.py", line 486, in _install_dependencies
    tar.extractall(str(target_dir))
  File "C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\tarfile.py", line 2036, in extractall
    self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(),
  File "C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\tarfile.py", line 2077, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
  File "C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\tarfile.py", line 2150, in _extract_member
    self.makefile(tarinfo, targetpath)
  File "C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\tarfile.py", line 2191, in makefile
    with bltn_open(targetpath, "wb") as target:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\leendert.vanwolfswin\\AppData\\Roaming\\3Di\\QGIS3\\profiles\\default\\python\\plugins\\threedi_results_analysis\\deps\\.\\h5py\\h5ac.cp39-win_amd64.pyd'

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
QGIS version: 3.28.13-Firenze Firenze, 3b4db4f561 

Python Path:
C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default\python\plugins\threedi_results_analysis\deps
C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_beta_processing
C:/PROGRA~1/3DIMOD~1.28/apps/qgis-ltr/./python
C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python
C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins
C:/PROGRA~1/3DIMOD~1.28/apps/qgis-ltr/./python/plugins
C:\PROGRA~1\3DIMOD~1.28\apps\grass\grass83\etc\python
C:\PROGRA~1\3DIMOD~1.28\bin
C:\PROGRA~1\3DIMOD~1.28\bin\python39.zip
C:\PROGRA~1\3DIMOD~1.28\apps\Python39\DLLs
C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib
C:\PROGRA~1\3DIMOD~1.28\apps\Python39
C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\site-packages
C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\site-packages\Pythonwin
C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default/python
C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default\python\plugins\lizard_qgis_plugin\deps\threedi_scenario_downloader-1.4-py3-none-any.whl
C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\default\python\plugins\lizard_qgis_plugin\deps\threedi_mi_utils-0.1.2-py3-none-any.whl
.
hoanphungt commented 3 months ago

@leendertvanwolfswinkel Ben took a look at this issue. According to him, this issue is hard to fix and restarting QGIS will solve this issue.

I think restarting QGIS will solve this anyway. QGIS locks DLLs so they cannot be removed.

leendertvanwolfswinkel commented 3 months ago

OK, will close it