Skip to content
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

Example script fails with newer Pillow #11

Open
ja2-derek opened this issue Aug 8, 2020 · 0 comments
Open

Example script fails with newer Pillow #11

ja2-derek opened this issue Aug 8, 2020 · 0 comments

Comments

@ja2-derek
Copy link
Member

ja2-derek commented Aug 8, 2020

Getting an error trying to run to_sti_8bit.py:

~/Workspace/ja2-open-toolset/examples$ python3 to_sti_8bit.py /mnt/d/Games/JA2Classic/mods/unfinished-business/Data/loadscreens/MM24Background.sti
Traceback (most recent call last):
  File "to_sti_8bit.py", line 63, in <module>
    main()
  File "to_sti_8bit.py", line 58, in main
    images = [Image.open(file) for file in args.files]
  File "to_sti_8bit.py", line 58, in <listcomp>
    images = [Image.open(file) for file in args.files]
  File "/home/derek/.local/lib/python3.6/site-packages/PIL/Image.py", line 2881, in open
    im = _open_core(fp, filename, prefix)
  File "/home/derek/.local/lib/python3.6/site-packages/PIL/Image.py", line 2867, in _open_core
    im = factory(fp, filename)
  File "/home/derek/.local/lib/python3.6/site-packages/PIL/ImageFile.py", line 107, in __init__
    self._open()
  File "/mnt/d/Workspace/ja2-open-toolset/ja2py/fileformats/Sti.py", line 486, in _open
    self.size = (header['width'], header['height'])
AttributeError: can't set attribute

I guess something has changed in newer version of Pillow. It seems to work after downgrading with pip3 install Pillow==4.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant