3dstools icon indicating copy to clipboard operation
3dstools copied to clipboard

png.ProtocolError: ProtocolError:

Open Fyred opened this issue 2 years ago • 3 comments

PS C:\3dstools> python ./bffnt.py -xf Caption_00.bffnt Traceback (most recent call last): File "C:\3dstools\bffnt.py", line 1234, in bffnt.extract(args.ensure_ascii) File "C:\3dstools\bffnt.py", line 341, in extract writer.write(file_, png_data) File "C:\Users\Fyred\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 668, in write nrows = self.write_passes(outfile, check_rows(rows)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Fyred\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 703, in write_passes return self.write_packed(outfile, rows) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Fyred\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 738, in write_packed for i, row in enumerate(rows): File "C:\Users\Fyred\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 658, in check_rows raise ProtocolError( png.ProtocolError: ProtocolError: Expected 2048 values but got 4096 values, in row 0

Fyred avatar Jan 14 '23 08:01 Fyred

I did some research and discovered the source of the error. If you're on Windows like I am, ensure that you have the following Python packages downloaded: https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv https://github.com/drj11/pypng/releases/tag/pypng-0.0.20

For both files, open Command Prompt and run py -3 -m pip install C:\Users\WhereverYouPutTheWhlFile

MasterKingSirPlease avatar Feb 05 '23 20:02 MasterKingSirPlease

It didn't help. I removed and installed the pypip-0.0.20 with opencv in the same way I get the same error..

alicechan-dev avatar Aug 01 '23 12:08 alicechan-dev

I guess I've solved this problem, I just installed a bit older version 0.0.19 of pypng. And it wrote "Done" :D

alicechan-dev avatar Aug 01 '23 12:08 alicechan-dev