Opening sim_vehicle.py file


#1

*********Description of the Problem
fails to run the file sim_vehicle.py
*********When does the problem occur
when trying to run sim_vehicle.py
*********Picture of the problem or text error
Traceback (most recent call last):
File “/home/david/apm/ardupilot/Tools/autotest/sim_vehicle.py”, line 833, in
parser.add_option("-v", “–vehicle”, type=‘choice’, default=None, help=“vehicle type (%s)” % vehicle_options_string, choices=_options.keys())
File “/usr/lib/python3.8/optparse.py”, line 1000, in add_option
option = self.option_class(*args, **kwargs)
File “/usr/lib/python3.8/optparse.py”, line 581, in init
checker(self)
File “/usr/lib/python3.8/optparse.py”, line 668, in _check_choice
raise OptionError(
optparse.OptionError: option -v/–vehicle: choices must be a list of strings (‘dict_keys’ supplied)


#2

Hi there @thompsondavid478

Are you running this on the standard Virtual Machine running Ubuntu 18.04 with the recommended software versions? I only ask because there are many different software packages that interplay to create a working simulated drone environment, and as new versions come out- things break everywhere. But with the current advised software versions the environment has been confirmed to work.

Additionally, it appears python3 is being referenced in the error output, but for now the course has been using python2.