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 with brushStyle #216

Open
pcav opened this issue Mar 25, 2015 · 4 comments
Open

Error with brushStyle #216

pcav opened this issue Mar 25, 2015 · 4 comments
Assignees

Comments

@pcav
Copy link

pcav commented Mar 25, 2015

I'm getting this error with a simple project:

An error has occured while executing Python code:

Traceback (most recent call last):
File "/home/paolo/.qgis2/python/plugins/qgis2leaf/qgis2leafdialog.py", line 297, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover, self.matchCRS, self.selected)
File "/home/paolo/.qgis2/python/plugins/qgis2leaf/qgis2leaf_exec.py", line 288, in qgis2leaf_exec
if i.rendererV2().symbol().symbolLayer(0).brushStyle() == 0:
AttributeError: 'QgsSimpleLineSymbolLayerV2' object has no attribute 'brushStyle'

@tomchadwin tomchadwin added the bug label Mar 25, 2015
@tomchadwin tomchadwin self-assigned this Mar 25, 2015
@pcav
Copy link
Author

pcav commented Mar 25, 2015

sorry, no attachments in gh. may I send you the file privately?

@tomchadwin
Copy link
Contributor

Issue confirmed and recreated. Looking at it now.

@tomchadwin
Copy link
Contributor

@pcav, you've uncovered a fairly fundamental issue with how qgis2leaf extracts style information from layers. It assumes that polygon layers have fill styles, and does not handle the "Outline:simple line" style which your example uses. This will take some work to fix.

In the meantime, your workaround would be to change to a simple fill style with a transparent fill and the border style you need.

@pcav
Copy link
Author

pcav commented Mar 25, 2015

I see, thanks. Perhaps issue a warning, or at least document the issue, for now?

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

2 participants