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

Extracted the file errors #4

Open
PackageInstaller opened this issue Feb 23, 2023 · 1 comment
Open

Extracted the file errors #4

PackageInstaller opened this issue Feb 23, 2023 · 1 comment

Comments

@PackageInstaller
Copy link

When I run the program, its prompts are as follows, and no file is extracted.
Reading /home/Neko/Unpack Tools/Puzzle-and-Dragons-Texture-Tool/mon2/cards_092.bc.bc.bc...
1 texture found.

Writing CARDS_092.PNG (1024 x 1024)...

Traceback (most recent call last):
File "/home/Neko/Unpack Tools/Puzzle-and-Dragons-Texture-Tool/PADTextureTool.py", line 441, in
main()
File "/home/Neko/Unpack Tools/Puzzle-and-Dragons-Texture-Tool/PADTextureTool.py", line 438, in main
TextureWriter.exportToImageFile(texture, outputFilePath)
File "/home/Neko/Unpack Tools/Puzzle-and-Dragons-Texture-Tool/PADTextureTool.py", line 201, in exportToImageFile
pngWriter.write_array(pngStream, flatPixelArray)
File "/home/Neko/Unpack Tools/Puzzle-and-Dragons-Texture-Tool/png.py", line 807, in write_array
self.write_passes(outfile, self.array_scanlines(pixels))
File "/home/Neko/Unpack Tools/Puzzle-and-Dragons-Texture-Tool/png.py", line 779, in write_passes
compressed = compressor.compress(tostring(data))
File "/home/Neko/Unpack Tools/Puzzle-and-Dragons-Texture-Tool/png.py", line 196, in tostring
return row.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
cards_092.bc.bc.bc.zip

@KKtheGhost
Copy link

I‘ve solved this issue with !5

And I've sent an email to Cody for code reviewing.

The root cause for the issue is quite simple:

array.array: tostring() and fromstring() methods have been removed. They were aliases to tobytes() and frombytes(), deprecated since Python 3.2. (Contributed by Victor Stinner in bpo-38916.)

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

2 participants