thumbor / opencv-engine

Thumbor engine for the openCV imaging library.
MIT License
26 stars 26 forks source link

AttributeError: 'cv2.cv.iplimage' object has no attribute 'tobytes' #28

Open fmunteanu opened 8 years ago

fmunteanu commented 8 years ago

Please see: https://github.com/thumbor/thumbor/issues/817

I was not sure where to open the issue, I encounter this error:

2016-10-13 04:09:42 tornado.application:ERROR Future exception was never retrieved: Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 270, in wrapper
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/thumbor/handlers/__init__.py", line 362, in finish_request
    callback=inner,
  File "/usr/lib64/python2.7/site-packages/thumbor/context.py", line 284, in queue
    self._execute_in_foreground(operation, callback)
  File "/usr/lib64/python2.7/site-packages/thumbor/context.py", line 272, in _execute_in_foreground
    callback(result)
  File "/usr/lib64/python2.7/site-packages/thumbor/handlers/__init__.py", line 355, in inner
    self._write_results_to_client(context, results, content_type)
  File "/usr/lib64/python2.7/site-packages/thumbor/handlers/__init__.py", line 394, in _write_results_to_client
    self.finish()
  File "/usr/lib64/python2.7/site-packages/tornado/web.py", line 955, in finish
    self.on_finish()
  File "/usr/lib64/python2.7/site-packages/thumbor/handlers/__init__.py", line 78, in on_finish
    len(self.context.request.engine.image.tobytes())
AttributeError: 'cv2.cv.iplimage' object has no attribute 'tobytes'