planetfederal / qgis-suite-plugin

GNU General Public License v2.0
25 stars 17 forks source link

Trying to add a vector layer to a QGIS project leads to Python error #28

Closed eshon closed 11 years ago

eshon commented 11 years ago

Trying to add a vector layer to a QGIS project leads to this error:

(Try layers from demo.opengeo.org/geoserver)

An error has occured while executing Python code:

Traceback (most recent call last): File "C:\Users\OpenGeo/.qgis2/python/plugins\opengeo\gui\gsexploreritems.py", line 545, in addLayerAction.triggered.connect(lambda: self.addLayerToProject(explorer)) File "C:\Users\OpenGeo/.qgis2/python/plugins\opengeo\gui\gsexploreritems.py", line 685, in addLayerToProject cat.addLayerToProject(self.element.name) File "C:\Users\OpenGeo/.qgis2/python/plugins\opengeo\qgis\catalog.py", line 296, in addLayerToProject raise e AttributeError: 'NoneType' object has no attribute 'sld_body'

Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

volaya commented 11 years ago

related to/caused by #32

volaya commented 11 years ago

Fixed. Now if trying to add a layer with no default style, it will add the layer without stlye(as it does when using drag&drop) and warn the user