BerkeleyLearnVerify / Scenic

A compiler and scenario generator for the Scenic scenario description language.
https://scenic-lang.org/
Other
283 stars 97 forks source link

TypeError: 'numpy.float64' object is not iterable #111

Closed gulnaz-zh closed 1 year ago

gulnaz-zh commented 1 year ago

When I try to run scenic examples/gta/badlyParkedCar2.scenic, the following error pop-ups: Beginning scenario construction... Traceback (most recent call last; use -b to show Scenic internals): File "C:\Users\Acer\formal\examples\gta\badlyParkedCar2.scenic", line 4, in from scenic.simulators.gta.model import File "c:\users\acer\verify\lib\site-packages\scenic\simulators\gta\model.scenic", line 13, in m = Map.fromFile(mapPath) File "c:\users\acer\verify\lib\site-packages\scenic\simulators\gta\interface.py", line 128, in fromFile m.edgeData = { tuple(e): center_detection.EdgeData(rest) for e, rest in data['edges'] } File "c:\users\acer\verify\lib\site-packages\scenic\simulators\gta\interface.py", line 128, in m.edgeData = { tuple(e): center_detection.EdgeData(rest) for e, *rest in data['edges'] } TypeError: 'numpy.float64' object is not iterable

Python 3.8.5 verifai 2.1.0b1 scenic 2.1.0b4

gulnaz-zh commented 1 year ago

Found solution. Thank you.

dfremont commented 1 year ago

Glad you figured it out! In case anyone else hits this issue, I'm guessing it was caused by having an old GTA map around (the map format changed in 1777775); deleting the map.npz file and regenerating it using make_map.py should fix it.