Skip to content

[bflim.py] error when doing png -> bflim #30

@eternalKink

Description

@eternalKink

Tried in latest python 2 and 3 versions.
python 2(7.18):

Traceback (most recent call last):
  File "bflim.py", line 836, in <module>
    bflim.load(args.create)
  File "bflim.py", line 273, in load
    for row in list(pixels):
  File "C:\Python27\lib\site-packages\png.py", line 1610, in iter_bytes_to_values
    for row in byte_rows:
  File "C:\Python27\lib\site-packages\png.py", line 1654, in iter_straight_byte_rows
    for some_bytes in byte_blocks:
  File "C:\Python27\lib\site-packages\png.py", line 2236, in decompress
    for data in data_blocks:
  File "C:\Python27\lib\site-packages\png.py", line 1874, in iteridat
    raise ChunkError(e.args[0])
png.ChunkError: ChunkError: I/O operation on closed file

python3(.11.3):

Traceback (most recent call last):
  File "D:\romhack stuff\tools\3dstools-master\bflim.py", line 836, in <module>
    bflim.load(args.create)
  File "D:\romhack stuff\tools\3dstools-master\bflim.py", line 273, in load
    for row in list(pixels):
               ^^^^^^^^^^^^
  File "C:\Python3\Lib\site-packages\png.py", line 1545, in _iter_bytes_to_values
    for row in byte_rows:
  File "C:\Python3\Lib\site-packages\png.py", line 1587, in _iter_straight_packed
    for some_bytes in byte_blocks:
  File "C:\Python3\Lib\site-packages\png.py", line 2194, in decompress
    for data in data_blocks:
  File "C:\Python3\Lib\site-packages\png.py", line 1826, in iteridat
    type, data = self.chunk(lenient=lenient)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python3\Lib\site-packages\png.py", line 1399, in chunk
    data = self.file.read(length)
           ^^^^^^^^^^^^^^^^^^^^^^
ValueError: read of closed file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions