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

AttributeError : 'NoneType' object has no attribute 'symbolLayer' #629

Closed
achos01 opened this issue Mar 22, 2018 · 8 comments
Closed

AttributeError : 'NoneType' object has no attribute 'symbolLayer' #629

achos01 opened this issue Mar 22, 2018 · 8 comments

Comments

@achos01
Copy link

achos01 commented Mar 22, 2018

  • QGIS version 2.18.17
  • qgis2web version 2.33.1
  • Using the option 'Style through rules' in Styles window.

When i try to export a layer into html page with qgis2web i have this error :

qgis2web produced an error:

Traceback (most recent call last):
File "C:/Users/ACH/.qgis2/python/plugins\qgis2web\maindialog.py", line 318, in previewMap
preview_file = self.createPreview()
File "C:/Users/ACH/.qgis2/python/plugins\qgis2web\maindialog.py", line 280, in createPreview
dest_folder=utils.tempFolder()).index_file
File "C:/Users/ACH/.qgis2/python/plugins\qgis2web\olwriter.py", line 89, in write
folder=dest_folder)
File "C:/Users/ACH/.qgis2/python/plugins\qgis2web\olwriter.py", line 128, in writeOL
popup, json, restrictToExtent, extent, feedback, matchCRS)
File "C:/Users/ACH/.qgis2/python/plugins\qgis2web\utils.py", line 180, in exportLayers
iface, extent, precision, crs, optimize)
File "C:/Users/ACH/.qgis2/python/plugins\qgis2web\utils.py", line 194, in exportVector
if is25d(layer, canvas, restrictToExtent, extent):
File "C:/Users/ACH/.qgis2/python/plugins\qgis2web\utils.py", line 448, in is25d
sl1 = sym.symbolLayer(1)
AttributeError: 'NoneType' object has no attribute 'symbolLayer'

Thanks in advance.

@achos01 achos01 changed the title qgis2web produced an error AttributeError : 'NoneType' object has no attribute 'symbolLayer' Mar 22, 2018
@tomchadwin
Copy link
Collaborator

Please see my response to another issue here:

#628 (comment)

This is not the same problem, but that answer should help you provide what is needed for someone to be able to debug this issue properly.

@tomchadwin
Copy link
Collaborator

I've committed a possible fix to master for #628 which might also fix this issue. Can you test and report back?

@achos01
Copy link
Author

achos01 commented Mar 28, 2018

I do not know how to solve this problem, can not find the solution anywhere

@tomchadwin
Copy link
Collaborator

Please try upgrading to qgis2web 3.0.1, now available in the QGIS plugin manager. Please report back on whether the error still occurs with 3.0.1

@tomchadwin
Copy link
Collaborator

Closed without further feedback - comment here and I'll reopen.

@galihalhakim
Copy link

i'm using QGIS 3 and still have this error.

AttributeError: 'NoneType' object has no attribute 'symbolLayer'
Traceback (most recent call last):
File "C:/Users/GALIH/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web\maindialog.py", line 323, in previewMap
preview_file = self.createPreview()
File "C:/Users/GALIH/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web\maindialog.py", line 286, in createPreview
dest_folder=utils.tempFolder()).index_file
File "C:/Users/GALIH/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web\leafletWriter.py", line 100, in write
folder=dest_folder)
File "C:/Users/GALIH/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web\leafletWriter.py", line 187, in writeLeaflet
exp_crs, minify)
File "C:/Users/GALIH/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web\utils.py", line 234, in exportVector
if is25d(layer, canvas, restrictToExtent, extent):
File "C:/Users/GALIH/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web\utils.py", line 490, in is25d
sl1 = sym.symbolLayer(1)
AttributeError: 'NoneType' object has no attribute 'symbolLayer'

@M-Rick
Copy link

M-Rick commented Oct 30, 2020

I am running QGIS 3.10.11 and still have the error as well.
Capture d’écran 2020-10-30 à 20 32 00

@zoran-cuckovic
Copy link

Hello,
I've had the same problem. It was resolved when I removed web layers, Bing Maps in my case. Prehaps some other gost layers may cause the same problem, such as empty memory layers.
Hope this helps.

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

5 participants