From 82d156cda4122fe137b8fd5a1a5bfcd3b048e517 Mon Sep 17 00:00:00 2001 From: nsubiron Date: Tue, 27 Feb 2018 14:48:42 +0100 Subject: [PATCH] Fix import error in Python 2 --- PythonClient/carla/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonClient/carla/sensor.py b/PythonClient/carla/sensor.py index ca2ea2505..822d93661 100644 --- a/PythonClient/carla/sensor.py +++ b/PythonClient/carla/sensor.py @@ -16,8 +16,6 @@ try: except ImportError: raise RuntimeError('cannot import numpy, make sure numpy package is installed.') -from . import image_converter - from .transform import Transform, Translation, Rotation, Scale @@ -156,6 +154,8 @@ class Image(SensorData): default format. """ if self._converted_data is None: + from . import image_converter + if self.type == 'Depth': self._converted_data = image_converter.depth_to_array(self) elif self.type == 'SemanticSegmentation':