Closed ThomasHuxhorn closed 3 years ago
Just ran into this issue with new download QGIS 3.16 on Windows 10:
AttributeError: 'NoneType' object has no attribute 'nodeType' Traceback (most recent call last): File "C:/Users/clark.catherine/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\quick_map_services\quick_map_services.py", line 176, in insert_layer add_layer_to_map(ds) File "C:/Users/clark.catherine/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\quick_map_services\qgis_map_helpers.py", line 148, in add_layer_to_map if selected_node.nodeType() == selected_node.NodeGroup: AttributeError: 'NoneType' object has no attribute 'nodeType'
Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.16.7-Hannover Hannover, 0471743889
did you install contrib pack?
Fixed in 0.19.19
Hi,
I made a new installation with QGIS 3.16.3 and Python 3.7.3. Install quickmapservice plugin, install contribution pack, try to add google or open streetmap layer and run into this error:
2021-02-24T10:48:20 WARNING Traceback (most recent call last): File "/home/kater/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/quick_map_services.py", line 176, in insert_layer add_layer_to_map(ds) File "/home/kater/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/qgis_map_helpers.py", line 148, in add_layer_to_map AttributeError: 'NoneType' object has no attribute 'nodeType'
The function iface.layerTreeView().currentNode() can return a NULL value / None Typ which is not checked. So I add this line bevor line 148 and not it works for me :)
if selected_node is not None:
I hope this helps Thomas