Postprocess fails during mutation
nicl-nno opened this issue · comments
The following error was facesd in paper-exp branch:
Traceback (most recent call last):
File "shapely\speedups_speedups.pyx", line 247, in shapely.speedups._speedups.geos_linearring_from_py
AttributeError: 'list' object has no attribute 'array_interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/GEFEST/cases/synthetic/analysis_of_applicability/number_of_vertices.py", line 90, in
result = optimize(task_setup=task_setup,
File "D:\GEFEST\gefest\core\opt\optimize.py", line 18, in optimize
_, best = GA(
File "D:\GEFEST\gefest\core\opt\GA\GA.py", line 20, in solution
self._pop.extend(self.reproduce(self._pop))
File "D:\GEFEST\gefest\core\opt\GA\base_GA.py", line 95, in reproduce
child_gen = self.mutation(structure=child_gen,
File "D:\GEFEST\gefest\core\opt\operators\mutation.py", line 55, in mutation
new_structure = get_pop_worker(domain=domain)
File "D:\GEFEST\gefest\core\opt\operators\initial.py", line 44, in get_pop_worker
structure = postprocess(structure, domain)
File "D:\GEFEST\gefest\core\algs\postproc\resolve_errors.py", line 33, in postprocess
elif out_of_bound(local_structure, domain):
File "D:\GEFEST\gefest\core\algs\geom\validation.py", line 33, in out_of_bound
if not domain.geometry.is_contain_poly(poly, domain_poly):
File "D:\GEFEST\gefest\core\geometry\geometry_2d.py", line 95, in is_contain_poly
geom_poly = GeomPolygon([self._pt_to_geom(pt) for pt in poly_1.points])
File "D:\GEFEST\venv_new\lib\site-packages\shapely\geometry\polygon.py", line 243, in init
ret = geos_polygon_from_py(shell, holes)
File "D:\GEFEST\venv_new\lib\site-packages\shapely\geometry\polygon.py", line 509, in geos_polygon_from_py
ret = geos_linearring_from_py(shell)
File "shapely\speedups_speedups.pyx", line 341, in shapely.speedups._speedups.geos_linearring_from_py
ValueError: A LinearRing must have at least 3 coordinate tuples