oscarpilote / Ortho4XP

A scenery generator for the X-Plane flight simulator
504 stars 206 forks source link

debian trixie: TypeError: 'MultiPolygon' object is not iterable #279

Open schenlap opened 1 month ago

schenlap commented 1 month ago

With debian trixie i get the following error during "Assemble Vector data"

  full_area=VECT.ensure_MultiPolygon(ops.cascaded_union([dico_airports[airport]['boundary'],dico_airports[airport]['runway'][0],dico_airports[airport]['hangar'],dico_airports[airport]['taxiway'][0],dico_airports[airport]['apron'][0]]))
Exception in thread Thread-1 (build_poly_file):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/home/xxx/X-Plane 12/Ortho4XP-1.30/src/O4_Vector_Map.py", line 42, in build_poly_file
    (apt_array,apt_area)=include_airports(vector_map,tile) 
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xxx/X-Plane 12/Ortho4XP-1.30/src/O4_Vector_Map.py", line 138, in include_airports
    APT.smooth_raster_over_airports(tile,dico_airports)
  File "/home/xxx/X-Plane 12/Ortho4XP-1.30/src/O4_Airport_Utils.py", line 429, in smooth_raster_over_airports
    for polygon in full_area:
                   ^^^^^^^^^
TypeError: 'MultiPolygon' object is not iterable

Python 3.12.6

schenlap commented 1 month ago

i thought with https://github.com/oscarpilote/Ortho4XP/pull/186 it should be fixed?

w8sl commented 1 month ago

It should be:

for polygon in full_area.geoms

186 has been merged to 1.40 - not 1.30