arthurRuf / 3dcitybuilder

Generate 3D Models of Urban Areas.
GNU General Public License v2.0
48 stars 11 forks source link

Uncaught AttributeError: 'QgsLayerTreeGroup' object has no attribute 'layer' #1

Closed Almavin closed 3 years ago

Almavin commented 3 years ago

Steps to reproduce

  1. First
  2. Second
  3. Third
Traceback (most recent call last):
  File "C:/Users/Nzumi/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\citygen\citygen_loader.py", line 234, in run
    self.cbxOrthoSource_on_change(0)
  File "C:/Users/Nzumi/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\citygen\citygen_loader.py", line 409, in cbxOrthoSource_on_change
    self.dlg.cbxOrthoLayer.setCurrentIndex(self.get_first_layer_by_name(["ortho", "rgb", "bild"], 0))
  File "C:/Users/Nzumi/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\citygen\citygen_loader.py", line 399, in get_first_layer_by_name
    if layer_name in i.layer().name().lower():
AttributeError: 'QgsLayerTreeGroup' object has no attribute 'layer'

citygen 0.2, QGIS 3.14.16-Pi on Windows 10

lmwu commented 3 years ago

Because of the "GROUP"?

PaoloT-16 commented 3 years ago

I got the same issue of @Almavin immagine

arthurRuf commented 3 years ago

Hi everyone,

I'm sorry for the late response. I need to pay more attention to GitHub Issues.

I fixed the bug you reported on version 0.3. It is already released on QGIS Plugin Repository. Please, tell me in case the problem persists (and also if it worked 😉).

Best regards