-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
“Image too big” thrown when file does not exist #210
Comments
The error is coming directly from libraw, looks like a bug. Can you report it over there? |
Generally yes, but I would have either only be able to relaying everything to this issue here without being able or I would have to spend some time on familiarising myself with LibRaw itself. |
Just tested rawpy 0.24.0 with the following: with rawpy.imread("non_existing_file.CR2") as
pass Which has raised It looks like it's been fixed in the meantime. |
@jtomori I cannot confirm this (with the same version of RawPy), which suggests that it depends on the operating system or version of libraw. |
Could you copy what exception you get? This is what I get: Python 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import rawpy
>>> rawpy.__version__
'0.24.0'
>>> rawpy.libraw_version
(0, 21, 3)
>>> with rawpy.imread("non_existing_file.CR2") as raw:
... pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\[redacted]\rawpy\__init__.py", line 20, in imread
d.open_file(pathOrFile)
File "rawpy\\_rawpy.pyx", line 413, in rawpy._rawpy.RawPy.open_file
File "rawpy\\_rawpy.pyx", line 955, in rawpy._rawpy.RawPy.handle_error
rawpy._rawpy.LibRawIOError: b'Input/output error |
Okay, I just found something interesting. With pure Python, I get pretty much the same as you do. With IPython, however, I get:
|
Interesting, I get the same |
What OS are you using? Today I've repeated the same test on Ubuntu (the same rawpy version) and I got the same error as you: When I've tried running sample binaries from LibRaw (same version: 0.21.3) on non-existing files then I got this error: rawpy's error codes are matching LibRaw's. The error mapping on rawpy's end looks fine as well. |
I am on Arch Linux. But I have also seen this issue on Ubuntu. |
When I enter a wrong filename, I do not get the expected
FileNotFoundError
, but: “Image too big for processing”:This happens to me with RawPy version 0.18.1 and
rawpy.libraw_version
being(0,21,1)
.The text was updated successfully, but these errors were encountered: