zoran-cuckovic / QGIS-visibility-analysis

Quantum GIS plugin for visibility analysis
GNU General Public License v3.0
72 stars 17 forks source link

Red algorithm into QGIS modeler #65

Closed Doctor-Who closed 6 months ago

Doctor-Who commented 1 year ago

Hello,

Configuration information :

Version de QGIS 3.22.9-Białowieża
Version de Qt 5.15.3
Version de Python 3.10.4
Version de GDAL/OGR 3.4.1
Version de Proj 8.2.1
Version de la base de données du registre EPSG v10.041 (2021-12-03)
Version de GEOS 3.10.2-CAPI-1.16.0
Version de SQLite 3.37.2
Version de PDAL 2.3.0
Version du client PostgreSQL 14.4 (Ubuntu 14.4-0ubuntu0.22.04.1)
Version de SpatiaLite 5.0.1
Version de QWT 6.1.4
Version de QScintilla2 2.11.6
Version de l'OS Pop!_OS 22.04 LTS
     

Extensions Python actives ViewshedAnalysis | 1.8

Using since January i've using algorithm create viewpoints and viewshed without any issue. I'm executing my modeler each month. Today I've open it and both are in red ?!

When trying to edit and see what happen, I've got error :

2022-09-14T10:35:54     WARNING    Traceback (most recent call last):
              File "/usr/share/qgis/python/plugins/processing/modeler/ModelerGraphicItem.py", line 177, in editComponent
              self.edit()
              File "/usr/share/qgis/python/plugins/processing/modeler/ModelerGraphicItem.py", line 150, in edit
              dlg = ModelerParametersDialog(elemAlg, self.model(), self.component().childId(),
              File "/usr/share/qgis/python/plugins/processing/modeler/ModelerParametersDialog.py", line 77, in __init__
              self.setWindowTitle(self._alg.displayName())
             AttributeError: 'NoneType' object has no attribute 'displayName'

Any idea of what could happen and how to fix ? I'm staying on LTS both for OS and LTR for QGIS so nothing should be broken by updates ?

Nicolas.

zoran-cuckovic commented 1 year ago

Hello Nicolas, If you didn't install a new version of QGIS, I guess the problem should come from your local files. Did you try to reinstall the plugin? Apparently QGIS cannot find it anymore.

Doctor-Who commented 1 year ago

Thanks for your help @zoran-cuckovic. The only things I've done is to update all my qgis plugin but your plugin have not updated since few month. So it shouldn't change. I've also try to revert to some previous commit to go back to 1.7. Same error. Plugin is installed, processing tool is activate but still in red into the processing model.

Capture d’écran du 2022-09-19 14-07-26 Capture d’écran du 2022-09-19 14-07-50 Capture d’écran du 2022-09-19 14-08-19

zoran-cuckovic commented 1 year ago

Hello, Does it work outside your modeler ; can you open it in the processing toolbox ?

Doctor-Who commented 1 year ago

Yes, I can create viewpoints from my DEM and some points.

zoran-cuckovic commented 1 year ago

Thanks, If the plugin works fine, I wouldn't know where the problem comes from. If Processing registered the plugin, it should be available to the Modeler... although I'm not familiar with the code driving the QGIS Modeler. You will have to inquire on possible Modeler issues (if there is no way of making viewshed work in Modeler).

Doctor-Who commented 1 year ago

Thanks for your answer. So I'm going to fix my modeler and compare with the one working before to try to identify a possible issue on processing modeler.

Doctor-Who commented 1 year ago

Dear @zoran-cuckovic

I've reopen this issue cause now I'm sure it's not QGIS (tested on LTR, old version and latest). Previously, I tell you that I've try to rollback to old commit from this github repository but unsuccessfully.

The only option I had was taking time to update my modeler but it's completely impossible, I'm stuck. If I try to edit it, it's not working, nothing happen except python error in log. If I try to remove it, it's not working, it said there is dependencies to remove first but as red block is not well recognize, I cannot update dependencies from my modeler.

I never realized that there were previous versions on the QGIS plugin repository. So I've try to download previous release from https://plugins.qgis.org/plugins/ViewshedAnalysis/#plugin-versions and the 1.7 is totally working. I probably not manage well rollback commit from github source code repository.

Have you an idea how to fix that regression between 1.8 and 1.7 ?

Many thanks for your help.

zoran-cuckovic commented 1 year ago

Hello, Did you try to recreate your model, or are you using your old script ? Internal module names were changed for the new version, see https://github.com/zoran-cuckovic/QGIS-visibility-analysis/issues/62#issuecomment-1143221311

Doctor-Who commented 1 year ago

Ok I understand well why I've got some red boxes now. Recreate from scratch will take a lot of time as it is complex. Perhaps I should try to edit manually xml files to change the name and fix the problem. Should it work ?