5

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

  • 1
    What's the error you encounter? Please edit your question to include the error message text in full (not as an image). – Midavalo Apr 29 '17 at 1:28
  • What does the log say? – Midavalo Apr 29 '17 at 2:51
  • Actually the log is in the image, that's where the error message is. I'm not sure why the log says to check the log. Unless there's another log I don't know about. – GDog Apr 29 '17 at 14:08
  • @GDog It is a classical error message. The problem is clear: there is a feature that is not recognized. Did you follow the steps explained in my answer? – mgri Apr 29 '17 at 14:42
2

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.

  • 1
    Comments are not for extended discussion; this conversation has been moved to chat. – Midavalo Apr 30 '17 at 2:39
  • I tried the Check Validity tool, and cleaned up any invalid lines I could find, then I used the Convert Lines to Polygons tool and it ran great! – Ayla Marie Jan 22 '18 at 20:57
1

I had similar issue, and discovered that I had lines with a 'NULL' length. I identified these using the field calculator and calculating the $length field, then deleting all lines with a 'NULL' length.

After this the Polygonize tool worked.

  • Can you explain how you did that please? I have the same issue as the OP on here, and I'd like to peruse this line of inquiry to see if this is the answer I need. – shawty Apr 14 '18 at 14:08
0

I had this problem with Point.shp when I tried to calculate X,Y coordinate. I found that ONE empty row was created (by mistake) in the file that actually had no geometry. So I deleted that empty row and then calculated XY.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.