jakimowb / eo-time-series-viewer

A QGIS Plugin to visualize raster time series in parallel.
https://eo-time-series-viewer.readthedocs.io/en/latest/
GNU General Public License v3.0
4 stars 0 forks source link

AttributeError: type object 'QgsMapLayerProxyModel' has no attribute 'Filters' #2

Open janzandr opened 9 months ago

janzandr commented 9 months ago

Installed version 1.18.20230408T142322.MAIN

Couldn't load plugin 'timeseriesviewerplugin' due to an error when calling its classFactory() method 

AttributeError: type object 'QgsMapLayerProxyModel' has no attribute 'Filters' 
Traceback (most recent call last):
  File "D:\QGIS/apps/qgis/./python\qgis\utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\timeseriesviewerplugin\__init__.py", line 38, in classFactory
    from eotimeseriesviewer.eotimeseriesviewerplugin import EOTimeSeriesViewerPlugin
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\ee_plugin\__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
  File "D:\QGIS/apps/qgis/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\timeseriesviewerplugin\eotimeseriesviewer\eotimeseriesviewerplugin.py", line 33, in 
    from eotimeseriesviewer import settings
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\ee_plugin\__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
  File "D:\QGIS/apps/qgis/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\timeseriesviewerplugin\eotimeseriesviewer\settings.py", line 9, in 
    from eotimeseriesviewer.qgispluginsupport.qps.plotstyling.plotstyling import PlotStyle
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\ee_plugin\__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
  File "D:\QGIS/apps/qgis/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\timeseriesviewerplugin\eotimeseriesviewer\qgispluginsupport\qps\plotstyling\plotstyling.py", line 49, in 
    from ..utils import findMapLayer, loadUi
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\ee_plugin\__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
  File "D:\QGIS/apps/qgis/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\timeseriesviewerplugin\eotimeseriesviewer\qgispluginsupport\qps\utils.py", line 3221, in 
    class SelectMapLayersDialog(QgsDialog):
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\timeseriesviewerplugin\eotimeseriesviewer\qgispluginsupport\qps\utils.py", line 3222, in SelectMapLayersDialog
    class LayerDescription(object):
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\timeseriesviewerplugin\eotimeseriesviewer\qgispluginsupport\qps\utils.py", line 3224, in LayerDescription
    def __init__(self, info: str, filters: QgsMapLayerProxyModel.Filters, allowEmptyLayer=False):
AttributeError: type object 'QgsMapLayerProxyModel' has no attribute 'Filters'

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.34.1-Prizren Prizren, 133927424d 

Python Path:
C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\Coregistration
D:/QGIS/apps/qgis/./python
C:/Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python
C:/Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins
D:/QGIS/apps/qgis/./python/plugins
D:\QGIS\apps\grass\grass83\etc\python
C:\Users\Andreas\Documents
D:\QGIS\bin\python39.zip
D:\QGIS\apps\Python39\DLLs
D:\QGIS\apps\Python39\lib
D:\QGIS\bin
C:\Users\Andreas\AppData\Roaming\Python\Python39\site-packages
D:\QGIS\apps\Python39
D:\QGIS\apps\Python39\lib\site-packages
D:\QGIS\apps\Python39\lib\site-packages\win32
D:\QGIS\apps\Python39\lib\site-packages\win32\lib
D:\QGIS\apps\Python39\lib\site-packages\Pythonwin
C:/Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\ee_plugin\extlibs_windows
C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\site-packages
C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\enmapboxplugin\enmapbox\qgispluginsupport\qps\pyqtgraph
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\enmapboxplugin\enmapbox\site-packages
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\enmapboxplugin\enmapbox\apps
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\enmapboxplugin\enmapbox\coreapps
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\enmapboxplugin\enmapbox\eo4qapps
.
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\qgis_stac\lib
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\timeseriesviewerplugin
Fenrihr commented 8 months ago

same error

No se pudo cargar el complemento 'timeseriesviewerplugin' debido a un error al llamar a su método classFactory() 

AttributeError: type object 'QgsMapLayerProxyModel' has no attribute 'Filters' 
Traceback (most recent call last):
  File "/app/share/qgis/python/qgis/utils.py", line 426, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin/__init__.py", line 38, in classFactory
    from eotimeseriesviewer.eotimeseriesviewerplugin import EOTimeSeriesViewerPlugin
  File "/app/share/qgis/python/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin/eotimeseriesviewer/eotimeseriesviewerplugin.py", line 33, in 
    from eotimeseriesviewer import settings
  File "/app/share/qgis/python/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin/eotimeseriesviewer/settings.py", line 9, in 
    from eotimeseriesviewer.qgispluginsupport.qps.plotstyling.plotstyling import PlotStyle
  File "/app/share/qgis/python/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin/eotimeseriesviewer/qgispluginsupport/qps/plotstyling/plotstyling.py", line 49, in 
    from ..utils import findMapLayer, loadUi
  File "/app/share/qgis/python/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin/eotimeseriesviewer/qgispluginsupport/qps/utils.py", line 3221, in 
    class SelectMapLayersDialog(QgsDialog):
  File "/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin/eotimeseriesviewer/qgispluginsupport/qps/utils.py", line 3222, in SelectMapLayersDialog
    class LayerDescription(object):
  File "/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin/eotimeseriesviewer/qgispluginsupport/qps/utils.py", line 3224, in LayerDescription
    def __init__(self, info: str, filters: QgsMapLayerProxyModel.Filters, allowEmptyLayer=False):
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'QgsMapLayerProxyModel' has no attribute 'Filters'

Versión de Python: 3.11.7 (main, Nov 10 2011, 15:00:00) [GCC 13.2.0] 
Versión de QGIS: 3.36.0-Maidenhead Maidenhead, exported 

Ruta de Python:
/app/share/qgis/python
/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python
/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins
/app/share/qgis/python/plugins
/usr/lib/python311.zip
/usr/lib/python3.11
/usr/lib/python3.11/lib-dynload
/app/lib/python3.11/site-packages
/usr/lib/python3.11/site-packages
/home/francisco/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python
mahuika commented 4 months ago

I found that changing QgsMapLayerProxyModel.Filters to QgsMapLayerProxyModel.filters in utils.py resolved this error

jakimowb commented 4 months ago

@mahuika @Fenrihr thank you for your comments. I am working on it. As now, most of the EOTSV is running again on QGIS 3.38, but I still have to fix some strange bugs that occure in my testing routines.