SMByC / CloudMasking

CloudMasking is a Qgis plugin for make the masking of clouds, cloud shadow, cirrus, aerosols, ice/snow and water for Landsat (4, 5, 7, 8, 9) products using different process such as Fmask, Blue Band, Cloud QA and QA Band.
https://smbyc.github.io/CloudMasking
GNU General Public License v3.0
16 stars 4 forks source link

Couldn't load plugin 'CloudMasking' #16

Closed hiewliwen closed 3 months ago

hiewliwen commented 3 months ago

Error when I tried to install this plugin. Full Traceback below.

Couldn't load plugin 'CloudMasking' due to an error when calling its classFactory() method 
ImportError: cannot import name '_fillminima' from 'CloudMasking.libs.fmask' (C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\CloudMasking\libs\fmask\__init__.py) 
Traceback (most recent call last):
  File "C:\PROGRA~1/QGIS33~2.3/apps/qgis/./python\qgis\utils.py", line 426, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\CloudMasking\__init__.py", line 128, in classFactory
    from .cloud_masking import CloudMasking
  File "C:\PROGRA~1/QGIS33~2.3/apps/qgis/./python\qgis\utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\CloudMasking\cloud_masking.py", line 39, in 
    from CloudMasking.core import cloud_filters, color_stack
  File "C:\PROGRA~1/QGIS33~2.3/apps/qgis/./python\qgis\utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\CloudMasking\core\cloud_filters.py", line 44, in 
    from fmask import fmask, landsatTOA, landsatangles, config, saturationcheck
  File "C:\PROGRA~1/QGIS33~2.3/apps/qgis/./python\qgis\utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\CloudMasking\libs\fmask\fmask.py", line 64, in 
    from . import fillminima
  File "C:\PROGRA~1/QGIS33~2.3/apps/qgis/./python\qgis\utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\CloudMasking\libs\fmask\fillminima.py", line 35, in 
    from CloudMasking.libs.fmask import _fillminima
ImportError: cannot import name '_fillminima' from 'CloudMasking.libs.fmask' (C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\CloudMasking\libs\fmask\__init__.py)

Python version: 3.12.3 (main, Apr 14 2024, 17:21:43) [MSC v.1938 64 bit (AMD64)] 
QGIS version: 3.36.3-Maidenhead Maidenhead, 2df96554 
Python Path:
•   C:/PROGRA~1/QGIS33~2.3/apps/qgis/./python
•   C:/Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python
•   C:/Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
•   C:/PROGRA~1/QGIS33~2.3/apps/qgis/./python/plugins
•   C:\PROGRA~1\QGIS33~2.3\apps\grass\grass83\etc\python
•   C:\Users\xxxxx\Documents
•   C:\Program Files\QGIS 3.36.3\bin\python312.zip
•   C:\PROGRA~1\QGIS33~2.3\apps\Python312\DLLs
•   C:\PROGRA~1\QGIS33~2.3\apps\Python312\Lib
•   C:\Program Files\QGIS 3.36.3\bin
•   C:\Users\xxxxx\AppData\Roaming\Python\Python312\site-packages
•   C:\PROGRA~1\QGIS33~2.3\apps\Python312
•   C:\PROGRA~1\QGIS33~2.3\apps\Python312\Lib\site-packages
•   C:\PROGRA~1\QGIS33~2.3\apps\Python312\Lib\site-packages\win32
•   C:\PROGRA~1\QGIS33~2.3\apps\Python312\Lib\site-packages\win32\lib
•   C:\PROGRA~1\QGIS33~2.3\apps\Python312\Lib\site-packages\Pythonwin
•   C:/Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python
•   C:\Users\xxxxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\DigitizingTools\tools
•   C:\Users\xxxxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\DigitizingTools
XavierCLL commented 3 months ago

Hi @hiewliwen thanks for reporting it.

I can confirm this bug and it is because the python version, and I need to add the support for that version of python in the plugin. I'm going to release a new version with it.

XavierCLL commented 3 months ago

Hi @hiewliwen, please check with version 24.6 and let me know how it goes

hiewliwen commented 3 months ago

Hi @hiewliwen, please check with version 24.6 and let me know how it goes

perfect. thanks for the very quick turnaround.