PythonAPI icon indicating copy to clipboard operation
PythonAPI copied to clipboard

Problems running any sample test cases or tests

Open roboserg opened this issue 3 years ago • 1 comments

Every script under \examples\SampleTestCases throws an error NameError: name 'env' is not defined

Is it supposed to be like that and not including the following two lines?

from environs import Env
env = Env()

Secondly, even if I add above two lines, the map loads, I see the car spawning and then the simulation abruptly dies with

Status: Error
Bridge socket was unexpectedly disconnected

No to mention I fail every test case with python -m unittest discover -v -c

roboserg avatar Aug 17 '21 01:08 roboserg

@roboserg you are right. Those two lines are missing from those examples. Thanks for pointing it out!

As for the bridge connection error, that would occur if there is no bridge running. These examples are all trying to make a bridge connection to cyber bridge in the Apollo repo. If you do not have that running (or the address is different) you will receive a fatal bridge error.

EDIT: A more correct fix would be to use os.environ.get(....) to get the scene name to be consistent.

hadiTab avatar Aug 29 '21 07:08 hadiTab