summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-03-20 20:35:54 -0400
committerLex Neva <github.com@lexneva.name>2019-03-20 20:35:54 -0400
commit69df0271b5e9c5be8ff0d16fe6e24f1e7ed8e6fc (patch)
tree993a02ca9e80e8f6b20f725d5327d1ba2b791925 /lib
parent685df3b3f05f8e81751bde2e7bb59c50b658f764 (diff)
protect against shapely error
Diffstat (limited to 'lib')
-rw-r--r--lib/stitches/auto_fill.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py
index b85d335e..8435d156 100644
--- a/lib/stitches/auto_fill.py
+++ b/lib/stitches/auto_fill.py
@@ -268,6 +268,11 @@ def build_travel_graph(fill_stitch_graph, shape, fill_stitch_angle, underpath):
graph.add_edge(*edge, weight=p1.distance(p2))
+ # otherwise we sometimes get exceptions like this:
+ # Exception AttributeError: "'NoneType' object has no attribute 'GEOSSTRtree_destroy'" in
+ # <bound method STRtree.__del__ of <shapely.strtree.STRtree instance at 0x0D2BFD50>> ignored
+ del rtree
+
return graph