Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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))

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

  • data_address = unicode(val['imageData']).encode('utf-8').split()[0]

  • data_address = str(val['imageData']).encode('utf-8').split()[0]

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 = unicode(val['data']).encode('utf-8').split()[0]
  • data_address = str(val['data']).encode('utf-8').split()[0]Also replaced unicode() withstr()

  • data_address = unicode(val['imageData']).encode('utf-8').split()[0]

  • data_address = str(val['imageData']).encode('utf-8').split()[0]

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