[GIS] Polygonizer Error “‘NoneType’ object has no attribute ‘isMultipart’ See log for more details”

errorqgisqgis-processing

I'm trying to polygonize. But I'm getting an error message:

'NoneType' object has no attribute 'isMultipart' See log for more
details

Basically what I'm trying to do is divide the city into blocks so I can assign a value to each block.

I'm not sure if I'm getting the error because of something about the lines or someting in the attribute table… Or something else.

Here's a closeup of what the street centerlines look like.

enter image description here

Maybe I need to clean up the lines or something, not sure. But anyway here's the error message I get when I run it.

enter image description here

Best Answer

From Python: Attribute Error - 'NoneType' object has no attribute 'something':

NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None. That usually means that an assignment or function call up above failed or returned an unexpected result.

This means that there are probably some features (geometries) that are not valid. You may check your input layer using the Check validity algorithm available from the Processing Toolbox and then try again to run the Polygonize tool. It will allow you to repair any eventually invalid geometry.

If it still doesn't work, you may also try the Lines to polygon tool or the Convert lines to polygons SAGA tool, which are both available from the Processing Toolbox.