-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Handle missing Python executable in ImageShow on macOS #6416
Conversation
Just curious - did you figure this out because you are in an environment where |
Yes. I'm not sure how much details I can share, but it's kind of a custom way of running Python where the final program is compiled, so there's no Python interpreter anymore (AFAIK). What about calling |
The subprocess doesn't just call However, given that #6045 dropped removing the image altogether on Unix, the current form of this PR is not unreasonable. |
I've created bryant1410#1 as a suggestion - if |
Sounds good to me! It works locally. I merged it so it's here. |
sys.executable
is empty or null
I’m still experiencing the issue where the temporary file is deleted before Preview can open it on Mac. Has/will this be resolved? |
This PR hasn't been released yet. It will be released as part of Pillow 9.3.0, due out towards the end of October. However, it doesn't sound like you're experiencing the same problem. Are you saying that your images are taking longer than 20 seconds to open in Preview? Are they very large? |
There are exceptional cases in which
sys.executable
is empty or null (see the docs). I think it's better to just not delete the image in these cases, instead of crashing.