User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2019-02-21 14:57:00

Dominik
User
From: Bern
Registered: 2018-09-26
Posts: 19

Error "AttributeError: 'NoneType' object has no attribute 'type'"

Hi,

I'm trying to create a quality mesh based on a model boundary and some breaklines. It always prints the follwing error message: 'AttributeError: 'NoneType' object has no attribute 'type''
I tried to use dividing constraints or leave them away. Both versions resulted in the same error message. What am I doing wrong? I printed the complete error message at the end of the post.

Cheers
Dominik



An error has occurred while executing Python code:

AttributeError: 'NoneType' object has no attribute 'type'
Traceback (most recent call last):
  File "C:/Users/Dominik/.qgis2/python/plugins\BASEmesh\quality\quality_dialog.py", line 184, in accept
    lines,nSegments = commonFunctions.extractLines(breaklinesLayer,nCells)
  File "C:/Users/Dominik/.qgis2/python/plugins\BASEmesh\tools\commonFunctions.py", line 279, in extractLines
    if feat.geometry().type()==QGis.Line: # double check for feature geometry
AttributeError: 'NoneType' object has no attribute 'type'


Python version: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)]
QGIS version: 2.18.24 Las Palmas, ff5bd09ab3

Python Path:
C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing
C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python
C:/Users/Dominik/.qgis2/python
C:/Users/Dominik/.qgis2/python/plugins
C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins
C:\PROGRA~1\QGIS2~1.18\bin\python27.zip
C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\plat-win
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\lib-tk
C:\PROGRA~1\QGIS2~1.18\bin
C:\PROGRA~1\QGIS2~1.18\apps\Python27
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Pythonwin
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
C:/Users/Dominik/.qgis2//python
C:/Users/Dominik/OneDrive/Dokumente/UniBe/Master/Masterarbeit/09_Daten/DefinitionDammbrüche


Dominik Vogt
MSc Student Institute of Geography University of Berne

Offline

#2 2019-02-22 14:10:46

Stephan Kammerer
Developer
Registered: 2015-03-31
Posts: 67

Re: Error "AttributeError: 'NoneType' object has no attribute 'type'"

Apparently there is a problem with one of your input geometries. Try the meshing without breaklines first, if this work, your breakline layer causes the problem. Did you draw the lines yourselfe or import them from another source?

Offline

#3 2019-02-22 15:42:50

Dominik
User
From: Bern
Registered: 2018-09-26
Posts: 19

Re: Error "AttributeError: 'NoneType' object has no attribute 'type'"

Stephan Kammerer wrote:

Apparently there is a problem with one of your input geometries. Try the meshing without breaklines first, if this work, your breakline layer causes the problem. Did you draw the lines yourselfe or import them from another source?

Indeed, I had problems with the input geometries. I had to clip my breaklines to the system boundary and afterwards it worked fine. I got the input data from a third person, didn't really check them before. Well, now I know for the next time... ;-)
Thanks heaps, Stephan!

Cheers Dominik


Dominik Vogt
MSc Student Institute of Geography University of Berne

Offline

Board footer

Powered by FluxBB