FS#60708 - [python-rawkit] No longer works with current libraw version

Attached to Project: Community Packages
Opened by Deepak Subburam (subburam) - Monday, 05 November 2018, 20:51 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Wednesday, 14 November 2018, 18:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Get the following error when instantiating the main class provided by this library--

ImportError: Unsupported Libraw version: 0.19.0.

Additional info:
This applies to python-rawkit 0.6.0-4

Steps to reproduce:
This task depends upon

Closed by  Jaroslav Lichtblau (Dragonlord)
Wednesday, 14 November 2018, 18:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  in python-rawkit-0.6.0-5
Comment by loqs (loqs) - Monday, 05 November 2018, 21:40 GMT Comment by Jaroslav Lichtblau (Dragonlord) - Tuesday, 13 November 2018, 20:24 GMT
patched python-rawkit-0.6.0-5 in community-testing, how does that one behave?
Comment by Deepak Subburam (subburam) - Wednesday, 14 November 2018, 04:26 GMT
Yes, I now can instantiate the class and run some operations, thanks.
There appears to be some bug with raw.save() as a TIFF file, but raw.save() as PPM file is fine. Probably an upstream bug and nothing further to do here, but let me report the Traceback in case Jaroslav/other experts know better:

In [35]: from rawkit.raw import Raw

In [36]: r = Raw(filename='7223.nef')

In [37]: r.save(filename='7223.tiff')
InsufficientMemory Traceback (most recent call last)
<ipython-input-37-3fe112f92d51> in <module>()
----> 1 r.save(filename='7223.tiff')

/usr/lib/python3.7/site-packages/rawkit/raw.py in save(self, filename, filetype)
156 self.unpack()
--> 157 self.process()
159 self.libraw.libraw_dcraw_ppm_tiff_writer(

/usr/lib/python3.7/site-packages/rawkit/raw.py in process(self)
122 """
123 self.options._map_to_libraw_params(self.data.contents.params)
--> 124 self.libraw.libraw_dcraw_process(self.data)
126 def save(self, filename=None, filetype=None):

/usr/lib/python3.7/site-packages/libraw/errors.py in check_call(exit_code, func, arguments)
128 if func.restype is c_error:
--> 129 raise_if_error(exit_code.value)
131 return exit_code

/usr/lib/python3.7/site-packages/libraw/errors.py in raise_if_error(error_code)
169 -100010: CanceledByCallback,
170 -100011: BadCrop
--> 171 }[error_code]


Comment by Jaroslav Lichtblau (Dragonlord) - Wednesday, 14 November 2018, 18:13 GMT
Ok, thanks for the quick reply!
Also, unfortunately not much expertise on the next issue, I'd say reporting it upstream will be the best way to go, if not done yet.