Skip to content

Bug Python #110

@Pruline

Description

@Pruline

What is the bug or the crash?

Erreur Python : Une erreur est survenue lors de l'éxécution du code Python: Voir le journal des erreurs Python pour plus de détails

Avertissement Python 
2023-02-14T11:11:05     WARNING    warning:C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py:888: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
              mod = _builtin_import(name, globals, locals, fromlist, level)
             
             traceback: File "", line 1, in 
              File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 443, in startPlugin
              if not _startPlugin(packageName):
              File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 423, in _startPlugin
              plugins[packageName] = package.classFactory(iface)
              File "C:\Users/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMDownloader\__init__.py", line 34, in classFactory
              from .osmDownloader import OSMDownloader
              File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              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/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMDownloader\osmDownloader.py", line 31, in 
              from .osmDownloader_dialog import OSMDownloaderDialog
              File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              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/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMDownloader\osmDownloader_dialog.py", line 36, in 
              from .osm_downloader import OSMRequest
              File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              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/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMDownloader\osm_downloader.py", line 25, in 
              from future import standard_library
              File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 1058, in _handle_fromlist
              File "", line 228, in _call_with_frames_removed
              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:\PROGRA~1\QGIS32~1.2\apps\Python39\lib\site-packages\future\standard_library\__init__.py", line 65, in 
              import imp
              File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              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:\PROGRA~1\QGIS32~1.2\apps\Python39\lib\imp.py", line 31, in 
              warnings.warn("the imp module is deprecated in favour of importlib; "

Erreur Python

2023-02-14T11:16:48     WARNING    Traceback (most recent call last):
              File "C:\Users/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\RoofClassify\plugin_main.py", line 300, in run
              classifiedImage = classifier.classifyRoofTypes(imgFilepath)
              File "C:\Users/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\RoofClassify\logic\classification.py", line 87, in classifyRoofTypes
              result = self.classifier_rf.predict(flatImg)
              File "C:\Users/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\RoofClassify\embedded_external_libs\sklearn\ensemble\_forest.py", line 808, in predict
              proba = self.predict_proba(X)
              File "C:\Users/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\RoofClassify\embedded_external_libs\sklearn\ensemble\_forest.py", line 861, in predict_proba
              Parallel(
              File "C:\Users\GLUSKI\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\RoofClassify\embedded_external_libs\joblib\parallel.py", line 1056, in __call__
              self.retrieve()
              File "C:\Users\GLUSKI\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\RoofClassify\embedded_external_libs\joblib\parallel.py", line 935, in retrieve
              self._output.extend(job.get(timeout=self.timeout))
              File "C:\PROGRA~1\QGIS32~1.2\apps\Python39\lib\multiprocessing\pool.py", line 771, in get
              raise self._value
              File "C:\PROGRA~1\QGIS32~1.2\apps\Python39\lib\multiprocessing\pool.py", line 125, in worker
              result = (True, func(*args, **kwds))
              File "C:\Users\GLUSKI\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\RoofClassify\embedded_external_libs\joblib\_parallel_backends.py", line 595, in __call__
              return self.func(*args, **kwargs)
              File "C:\Users\GLUSKI\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\RoofClassify\embedded_external_libs\joblib\parallel.py", line 262, in __call__
              return [func(*args, **kwargs)
              File "C:\Users\GLUSKI\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\RoofClassify\embedded_external_libs\joblib\parallel.py", line 262, in 
              return [func(*args, **kwargs)
              File "C:\Users/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\RoofClassify\embedded_external_libs\sklearn\utils\fixes.py", line 216, in __call__
              return self.function(*args, **kwargs)
              File "C:\Users/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\RoofClassify\embedded_external_libs\sklearn\ensemble\_forest.py", line 640, in _accumulate_prediction
              prediction = predict(X, check_input=False)
              File "C:\Users/GLUSKI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\RoofClassify\embedded_external_libs\sklearn\tree\_classes.py", line 972, in predict_proba
              proba = self.tree_.predict(X)
              File "sklearn\tree\_tree.pyx", line 753, in sklearn.tree._tree.Tree.predict
              File "sklearn\tree\_tree.pyx", line 755, in sklearn.tree._tree.Tree.predict
             numpy.core._exceptions._ArrayMemoryError: Unable to allocate 6.11 GiB for an array with shape (205101712, 1, 4) and data type float64

Steps to reproduce the issue

Utilisation du plugin avec l'image totale.

Versions

version 3.22.16

Supported QGIS version

  • I'm running a supported QGIS version according to the official roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions