Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plug in doesn't launch : AttributeError: 'NoneType' object has no attribute 'parent' #117

Open
ptycharly opened this issue Oct 14, 2022 · 4 comments

Comments

@ptycharly
Copy link

Hi, I can't launch the plugin. I have the following error :

2022-10-14T09:41:48 WARNING Traceback (most recent call last): File "/Users/gopubconseil/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qtiles/qtiles.py", line 97, in run d = qtilesdialog.QTilesDialog(self.iface) File "/Users/gopubconseil/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qtiles/qtilesdialog.py", line 91, in __init__ self.manageGui() File "/Users/gopubconseil/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qtiles/qtilesdialog.py", line 131, in manageGui groupName = utils.getLayerGroup(layer[0]) File "/Users/gopubconseil/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qtiles/qtiles_utils.py", line 57, in getLayerGroup return QgsProject.instance().layerTreeRoot().findLayer(layerId).parent().name() AttributeError: 'NoneType' object has no attribute 'parent'

I use the latest version of QTile (1.7.1)
I Test it on Qgis LTR 3.22 an 3.26

Thank you!

@simgislab
Copy link
Member

please update to latest version of the plugin and try again

@co00co
Copy link

co00co commented Apr 27, 2023

Hello.
I'm using version 1.7.2 ,and got this error:
src/core/qgsmessagelog.cpp:29 : (logMessage) [24042ms] 2023-04-27T13:48:37 Error de Python[1] Traceback (most recent call last):
File "/home/blah/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qtiles/qtiles.py", line 97, in run
d = qtilesdialog.QTilesDialog(self.iface)
File "/home/blah/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qtiles/qtilesdialog.py", line 91, in init
self.manageGui()
File "/home/blah/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qtiles/qtilesdialog.py", line 131, in manageGui
groupName = utils.getLayerGroup(layer[0])
File "/home/blah/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qtiles/qtiles_utils.py", line 57, in getLayerGroup
return QgsProject.instance().layerTreeRoot().findLayer(layerId).parent().name()
AttributeError: 'NoneType' object has no attribute 'parent'

Let me know if i can give you more feedback.
Thanks!

@boucur
Copy link

boucur commented May 24, 2023

I receive the same error when attempting to launch the plugin for the first time in Q 3.28.1 (plugin version 1.7.2):

2023-05-24T12:51:29     WARNING    Traceback (most recent call last):
              File "C:\Users/blah2/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qtiles\qtiles.py", line 97, in run
              d = qtilesdialog.QTilesDialog(self.iface)
              File "C:\Users/blah2/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qtiles\qtilesdialog.py", line 91, in __init__
              self.manageGui()
              File "C:\Users/blah2/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qtiles\qtilesdialog.py", line 131, in manageGui
              groupName = utils.getLayerGroup(layer[0])
              File "C:\Users/blah2/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qtiles\qtiles_utils.py", line 57, in getLayerGroup
              return QgsProject.instance().layerTreeRoot().findLayer(layerId).parent().name()
             AttributeError: 'NoneType' object has no attribute 'parent'
             
             

@dezhin
Copy link
Member

dezhin commented Oct 5, 2023

Can you share a screenshot of your layers panel before you're trying to launch the plugin? It seems something unusual there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants