ImportError: cannot import name 'getTempDirInTempFolder' from 'processing'

Issue #1357 resolved
Benjamin Jakimow created an issue

The getTempDirInTempFolder is removed in the current QGIS master (QGIS 3.25). “from processing import getTempDirInTempFolder” will fail in future QGIs versions.

def getTempDirInTempFolder():
    """Returns a temporary directory, putting it into a temp folder.
    """

    path = QgsProcessingUtils.tempFolder()
    path = os.path.join(path, uuid.uuid4().hex)
    mkdir(path)
    return path

Comments (16)

  1. Benjamin Jakimow reporter

    @Andreas Janz meanwhile QGIS 3.26 is released and this error occurs in normal user installations.

  2. Agustin Lobo

    Well, I actually reported the error for 3.26, hence it is not resolved with the current 3.10.0.20220609T095816.MASTER A fix to an installation problem should be immediatly incorporated into a new version, otherwise users cannot take advantage of the fix.

    Agustin Lobo aloboaleu@gmail.com

  3. Grit Kirches

    EnMAPBoxApplication error(s):

    classificationdatasetmanagerapp:

    ImportError:cannot import name 'getTempDirInTempFolder' from 'processing.tools.system' (C:\PROGRA~1/QGIS32~1.1/apps/qgis/./python/plugins\processing\tools\system.py)
    Traceback:
    File "C:\Users/grit/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\applications.py", line 294, in addApplicationFolder
    appModule = importlib.import_module(appPkgName)
    File "C:\PROGRA~1\QGIS32~1.1\apps\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "", line 1030, in _gcd_import
    File "", line 1007, in _find_and_load
    File "", line 986, in _find_and_load_unlocked
    File "", line 680, in _load_unlocked
    File "", line 855, in exec_module
    File "", line 228, in _call_with_frames_removed
    File "C:\Users\grit\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps\classificationdatasetmanagerapp\__init__.py", line 4, in
    from classificationdatasetmanagerapp.classificationdatasetmanagergui import ClassificationDatasetManagerGui
    File "C:\Users/grit/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
    File "C:\PROGRA~1/QGIS32~1.1/apps/qgis/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "C:\Users\grit\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps\classificationdatasetmanagerapp\classificationdatasetmanagergui.py", line 15, in
    from processing.tools.system import getTempDirInTempFolder

    classificationworkflowapp:

    ImportError:cannot import name 'getTempDirInTempFolder' from 'processing.tools.system' (C:\PROGRA~1/QGIS32~1.1/apps/qgis/./python/plugins\processing\tools\system.py)
    Traceback:
    File "C:\Users/grit/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\applications.py", line 294, in addApplicationFolder
    appModule = importlib.import_module(appPkgName)
    File "C:\PROGRA~1\QGIS32~1.1\apps\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "", line 1030, in _gcd_import
    File "", line 1007, in _find_and_load
    File "", line 986, in _find_and_load_unlocked
    File "", line 680, in _load_unlocked
    File "", line 855, in exec_module
    File "", line 228, in _call_with_frames_removed
    File "C:\Users\grit\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps\classificationworkflowapp\__init__.py", line 4, in
    from classificationworkflowapp.classificationworkflowgui import ClassificationWorkflowGui
    File "C:\Users/grit/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
    File "C:\PROGRA~1/QGIS32~1.1/apps/qgis/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "C:\Users\grit\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps\classificationworkflowapp\classificationworkflowgui.py", line 56, in
    from processing.tools.system import getTempDirInTempFolder

    Versions:

    QGIS-Version 3.26.1-Buenos Aires QGIS-Codeversion b609df9ed4d
    Qt-Version 5.15.3
    Python-Version 3.9.5
    GDAL-Version 3.5.1
    PROJ-Version 9.0.1
    EPSG-Registraturdatenbankversion v10.064 (2022-05-19)
    GEOS-Version 3.10.3-CAPI-1.16.1
    SQLite-Version 3.38.1
    PDAL-Version 2.3.0
    PostgreSQL-Client-Version unknown
    SpatiaLite-Version 5.0.1
    QWT-Version 6.1.6
    QScintilla2-Version 2.13.1
    BS-Version Windows 10 Version 2009
    Aktive Python-Erweiterungen
    ee_plugin 0.0.5
    enmapboxplugin 3.10.0.20220609T095816.master
    db_manager 0.1.20
    grassprovider 2.12.99
    MetaSearch 0.3.6
    processing 2.12.99
    sagaprovider 2.12.99

  4. Log in to comment