“AttributeError: ‘NoneType’ object has no attribute ‘ExportToWkb’

Hi,
I use InVEST 3.12.1 to run Coastal Vulnerability model. All input data are in the correct type. The run give an Error and I see from the log that is “AttributeError: ‘NoneType’ object has no attribute ‘ExportToWkb’”.
Can you please help me to solve this error?
I post in this link theentire text log file
InVEST-natcap.invest.coastal_vulnerability-log-2023-05-18–17_12_35.txt (4.9 KB)

Hello, usually this error indicates that the model encountered a vector feature that should have had a geometry but didn’t. Would you please check your input vectors and verify that each feature has a geometry?

I believe we fixed an issue very similar to this in InVEST 3.13, so you could also try out the latest version of InVEST.

James

Thank you James,
I just checked the input file to verify the geometry and I think that the problem is in the AOI input. Unfortunately I can’t figure out how to change it in the correct way. How can I solve the problem from the shapefile in order to have the correct geometry?
Thanks
SM

Yep! I confirm from the logfile that the issue is with your AOI vector.

Well, I’m not sure I know how to add a geometry to an existing feature, but you could always create a feature with the new geometry and the correct attributes (if any) for the feature. Here are some docs for QGIS and ArcGIS. You’ll want to be sure to delete your former feature from the vector (the one that doesn’t have a geometry) before running InVEST with the edited vector.

Let us know how this goes!
James

Thanks for your help,
I will try it immediately and I’ll tell you how it goes.
SM

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.