multunus / autonomous-rc-car

Autonomous RC car using Raspberry Pi and ANN
MIT License
306 stars 102 forks source link

ValueError("'arr' does not have a suitable array shape for any mode.") ERROR #22

Open kush-1277 opened 5 years ago

kush-1277 commented 5 years ago

We are getting the following error while executing autonomous.py in RPi 3 Model B v1.2

Traceback (most recent call last): File "autonomous.py", line 92, in main() File "autonomous.py", line 89, in main autonomous_control(model) File "autonomous.py", line 27, in autonomous_control direction = predictor.predict(stream) File "/home/pi/test/mu/multunus/predict.py", line 33, in predict input_layer_size, number_of_labels, x_value = _convert_stream_to_array(stream) File "/home/pi/test/mu/multunus/predict.py", line 58, in _convert_stream_to_array resized_image_array = imresize(image_array, IMAGE_DIMENSIONS) File "/usr/lib/python3/dist-packages/scipy/misc/pilutil.py", line 421, in imresize im = toimage(arr, mode=mode) File "/usr/lib/python3/dist-packages/scipy/misc/pilutil.py", line 238, in toimage raise ValueError("'arr' does not have a suitable array shape for any mode.") ValueError: 'arr' does not have a suitable array shape for any mode.

What could the mistake from our side???