Pillow: Image.show() uses hardcoded path no longer valid in macOS 10.15

Created on 9 Jun 2019  路  4Comments  路  Source: python-pillow/Pillow

What did you do?

Image.show()

What did you expect to happen?

Shows image in Preview.app

What actually happened?

Crashes with invalid path for Preview.app

What are your OS, Python and Pillow versions?

  • OS: macOS 10.15
  • Python: Python 3.7.3
  • Pillow: 6.0.0

https://github.com/python-pillow/Pillow/blob/f1ed79229ece02a52e4d0df4acda2e26419ea8f4/src/PIL/ImageShow.py#L141

As part of security improvements, operating system is now separated from user data in macOS 10.15, in a read-only volume. [ref]
/Applications/Preview.app is now /System/Applications/Preview.app.

Bug macOS

Most helpful comment

Thanks for testing Pillow with beta macOS! I've created PR #3896 to address this.

All 4 comments

Thanks for testing Pillow with beta macOS! I've created PR #3896 to address this.

The best option compatible with all macOS systems would be: open -a Preview <params>

The best option compatible with all macOS systems would be: open -a Preview <params>

The PR has open -a Preview.app. Is it better to omit the .app extension?

basically it's the same. .app extension will say explicitly that you opens the app.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thinrhino picture thinrhino  路  3Comments

maxhumber picture maxhumber  路  3Comments

hxzhao527 picture hxzhao527  路  4Comments

readyready15728 picture readyready15728  路  4Comments

edowson picture edowson  路  3Comments