From 5738fa39f1910378589d90d1c598f3f10232af4c Mon Sep 17 00:00:00 2001 From: DaveyBiggers Date: Tue, 26 Sep 2017 14:27:08 +0100 Subject: [PATCH] Missed a string/bytes error --- Malmo/samples/Python_examples/radar_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Malmo/samples/Python_examples/radar_test.py b/Malmo/samples/Python_examples/radar_test.py index a0b76755d..0924cb078 100755 --- a/Malmo/samples/Python_examples/radar_test.py +++ b/Malmo/samples/Python_examples/radar_test.py @@ -96,7 +96,7 @@ def processFrame(self, frame): # Get the depth value from the centre of the map: mid_pix = 2 * video_width * (video_height + 1) # flattened index of middle pixel - depth = scale * struct.unpack('f', str(frame.pixels[mid_pix:mid_pix + 4]))[0] # unpack 32bit float + depth = scale * struct.unpack('f', bytes(frame.pixels[mid_pix:mid_pix + 4]))[0] # unpack 32bit float # Draw the "blip": x = cx + depth * math.cos(angle)