ObsidianX/3dstools

png version?

Raugo opened this issue · 3 comments

Raugo commented

Hello I'm trying to use the bflim tool, but I obtain this error

Traceback (most recent call last):
File "E:\pruebas\STG\pruebas\bflim.py", line 836, in
bflim.load(args.create)
File "E:\pruebas\STG\pruebas\bflim.py", line 273, in load
for row in list(pixels):
File "build\bdist.win32\egg\png.py", line 1427, in iterstraight
File "build\bdist.win32\egg\png.py", line 1656, in iterdecomp
File "build\bdist.win32\egg\png.py", line 1629, in iteridat
png.ChunkError: ChunkError: I/O operation on closed file

What version of png.py are you using?

Thanks

Can we reopen this issue, please? I am experiencing the exact same error. I've attempted this with png.py version 0.0.17 and version 0.0.18. Same results each time.

What version of png.py are you using? Are 0.0.17 and 0.0.18 incompatible?

For clarity's sake, here is my exact error message:

python2 bflim.py -c in.png out.bflim

Traceback (most recent call last):

      File “bflim.py”, line 836, in
            bflim.load(args.create)
      File “bflim.py”, line 273, in load
            for row in list(pixels):
      File “build\bdist.win32\egg\png.py”, line 1678, in iterstraight
      File “build\bdist.win32\egg\png.py”, line 1911, in iterdecomp
      File “build\bdist.win32\egg\png.py”, line 1888, in iteridat
png.ChunkError: ChunkError: I/O operation on closed file

I don't know what changed in Python and/or PyPng, but I found that simply deleting/commenting out line 271, "png_file.close()" fixes this issue. I haven't noticed any noticable memory leaking issues as a result, and converted images are valid and load in the game I am modifying.