Carla-Lane-Detection-Dataset-Generation
Carla-Lane-Detection-Dataset-Generation copied to clipboard
IndexError: Cannot choose from an empty sequence
On running python fast_lane_detection.py
I am getting the following error:
python fast_lane_detection.py
pygame 2.1.0 (SDL 2.0.16, Python 3.7.11)
Hello from the pygame community. https://www.pygame.org/contribute.html
Saving files...
Destroying actors and cleaning up.
Done.
Traceback (most recent call last):
File "fast_lane_detection.py", line 976, in <module>
main()
File "fast_lane_detection.py", line 972, in main
carlaGame.execute()
File "fast_lane_detection.py", line 309, in execute
self.initialize()
File "fast_lane_detection.py", line 341, in initialize
self.vehicle = self.world.spawn_actor(random.choice(self.blueprint_library.filter('vehicle.mustang.mustang')), self.start_position)
File "/home/kaustab/miniconda3/envs/carla/lib/python3.7/random.py", line 261, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
Sorry for the late response...
It seems you are using a CARLA version greater than 0.9.11 (This repo is based on 0.9.11). Try another vehicle, I think vehicle.mustang.mustang
got renamed to something slightly different, probably to vehicle.ford.mustang
. That's why it raises an exception, since it cannot choose a vehicle.
Sorry for the late response...
It seems you are using a CARLA version greater than 0.9.11 (This repo is based on 0.9.11). Try another vehicle, I think
vehicle.mustang.mustang
got renamed to something slightly different, probably tovehicle.ford.mustang
. That's why it raises an exception, since it cannot choose a vehicle.
This worked for me in Carla 0.9.14 (Windows)