# Revision history [back]

I had the same problem. You need to install Pillow for Python 3: pip3 install Pillow

Then replace the import Image with: from PIL import Image

The remaining problem is to convert cv_imshow.py from python 2 to python 3.

Here is what I did: - return (seq[pos:pos + size] for pos in xrange(0, len(seq), size)) + return (seq[pos:pos + size] for pos in range(0, len(seq), size))

However I type (gdb) source /home/MAGICLEAP/user/gdb-imshow/cv_imshow.py (gdb) cv_imshow img_color

I get the following error:

CV_8U with 3 channels, 512 rows and 512 cols Python Exception <class 'typeerror'=""> argument must be a sequence: Error occurred in Python command: argument must be a sequence

I had the same problem. You need to install Pillow for Python 3: pip3 install Pillow

Then replace the import Image with: from PIL import Image

The remaining problem is to convert cv_imshow.py from python 2 to python 3.

Here is what I did: - did:

return

-return (seq[pos:pos + size] for pos in xrange(0, len(seq), size)) + size))
return +return (seq[pos:pos + size] for pos in range(0, len(seq), size))

• data_address = str(val['data']).encode('utf-8').split()[0]Also replaced unicode() withstr()

However when I type type

(gdb) source /home/MAGICLEAP/user/gdb-imshow/cv_imshow.py (gdb) cv_imshow img_color

I get the following error:

CV_8U with 3 channels, 512 rows and 512 cols Python Exception <class 'typeerror'=""> argument must be a sequence: Error occurred in Python command: argument must be a sequence

I had the same problem. You need to install Pillow for Python 3: pip3 install Pillow

Then replace the import Image with: from PIL import Image

The remaining problem is to convert cv_imshow.py from python 2 to python 3.

Here is what I did:

-return (seq[pos:pos + size] for pos in xrange(0, len(seq), size))
+return (seq[pos:pos + size] for pos in range(0, len(seq), size))

Also replaced unicode() withstr()

However when I type

(gdb) source /home/MAGICLEAP/user/gdb-imshow/cv_imshow.py (gdb) cv_imshow img_color

I get the following error:

CV_8U with 3 channels, 512 rows and 512 cols Python Exception <class 'typeerror'=""> argument must be a sequence: Error occurred in Python command: argument must be a sequence

* EDIT * I found a forked version of this script that is compatible with python 3 and works like a charm: https://github.com/cuekoo/GDB-ImageWatch