From 8f04b54014a35a1412c6666596586465df2d39fe Mon Sep 17 00:00:00 2001 From: Jacopo Bartiromo <32928804+jackbart94@users.noreply.github.com> Date: Mon, 8 Jul 2019 16:39:05 +0200 Subject: [PATCH] Fix import for automatic_control.py Due to folder structure, the actual version raises an issue: https://github.com/carla-simulator/carla/issues/1756 It can be fixed using another type of import, however the folder structure has to remain the same for it to work. --- PythonAPI/examples/automatic_control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PythonAPI/examples/automatic_control.py b/PythonAPI/examples/automatic_control.py index 12be27c89..89f82e4aa 100755 --- a/PythonAPI/examples/automatic_control.py +++ b/PythonAPI/examples/automatic_control.py @@ -79,7 +79,7 @@ except IndexError: # -- add PythonAPI for release mode -------------------------------------------- # ============================================================================== try: - sys.path.append(glob.glob('PythonAPI')[0]) + sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + '/carla') except IndexError: pass