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

Error when creating label layer from polygon layer #6

Open
Chris-Robertson opened this issue Feb 5, 2015 · 1 comment
Open

Error when creating label layer from polygon layer #6

Chris-Robertson opened this issue Feb 5, 2015 · 1 comment

Comments

@Chris-Robertson
Copy link

I get the error below when trying to run the plugin on a polygon layer. Reproduced in 2.6.1, 2.6, 2.4.

Error does not occur when creating label layer from point or line layer.

Traceback (most recent call last):
  File "C:/Users/Chris/.qgis2/python/plugins\EasyCustomLabeling\EasyCustomLabeling.py", line 515, in runLabel
    WKTLine = 'LINESTRING('+ str(geom.centroid().asPoint().x() +0.0001) +' '+  str(geom.centroid().asPoint().y() +0.0001 ) + ' , '+ str(geom.centroid().asPoint().x())+ ' ' +str(geom.centroid().asPoint().y())+ ')'
AttributeError: 'NoneType' object has no attribute 'centroid'


Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]


QGIS version:
2.6.1-Brighton Brighton, e2a51df
@haubourg
Copy link
Owner

haubourg commented Feb 6, 2015

Hi, can you share the polygon layer triggering that? Geometry seems not interpreted correctly..

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

No branches or pull requests

2 participants