Fix error for older Shapely versions

This commit is contained in:
Andres Vazquez 2022-09-14 12:45:00 -03:00
parent ca7a054a39
commit 31d73b2b48
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,11 @@ import six
import geojson
import shapely.geometry
from shapely.errors import GeometryTypeError
try:
from shapely.errors import GeometryTypeError
except ImportError:
# Previous version of shapely uses ValueError and TypeError
GeometryTypeError = (ValueError, TypeError)
import ckantoolkit as tk