ObsidianX / 3dstools

Tools for extracting and packing resources found in 3DS games
51 stars 15 forks source link

png version? #2

Closed Raugo closed 8 years ago

Raugo commented 8 years ago

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

ObsidianX commented 8 years ago

I use PyPNG: https://pythonhosted.org/pypng/index.html

ubergeek77 commented 7 years ago

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

ubergeek77 commented 7 years ago

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.