justbilt / untp Goto Github PK
View Code? Open in Web Editor NEWA command line tool to split TexturePacker published files.
License: MIT License
A command line tool to split TexturePacker published files.
License: MIT License
有的plist文件会报错如下,请问为什么呀:
C:\Users\Administrator\Desktop\uuu>untp FishActor-Marlin.plist
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Python27\Scripts\untp.exe_main.py", line 9, in
File "c:\python27\lib\site-packages\untp\untp.py", line 121, in main
return unpacker(argument.path, image_file = argument.image_file, output_dir = argument.output)
File "c:\python27\lib\site-packages\untp\untp.py", line 44, in unpacker
data = dataparse.parse_file(data_file, config, extra_data_receiver)
File "c:\python27\lib\site-packages\untp\dataparse.py", line 20, in parse_file
return parse_plistdata(data)
File "c:\python27\lib\site-packages\untp\dataparse.py", line 106, in parse_plistdata
frame["x"],
TypeError: 'NoneType' object has no attribute 'getitem'
there is something wrong when i use these tool ,
Traceback (most recent call last): File "./untp.py", line 125, in <module> main() File "./untp.py", line 122, in main return unpacker(argument.path, image_file = argument.image_file, output_dir = argument.output) File "./untp.py", line 46, in unpacker frame_data_list = data.get("frames") if data else None AttributeError: 'list' object has no attribute 'get' xiayangqundeMacBook-Pro:untp xiayangqun$ ./untp.py /Users/xiayangqun/Documents/PersonWorkSpace/AppleDeveloper/zombieKiller/OriginalRes/ui/shop.plist input /Users/xiayangqun/Documents/PersonWorkSpace/AppleDeveloper/zombieKiller/OriginalRes/ui/shop.plist Traceback (most recent call last): File "./untp.py", line 125, in <module> main() File "./untp.py", line 122, in main return unpacker(argument.path, image_file = argument.image_file, output_dir = argument.output) File "./untp.py", line 46, in unpacker frame_data_list = data.get("frames") if data else None AttributeError: 'list' object has no attribute 'get'
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Windows\system32>untp
Exception in Tkinter callback
Traceback (most recent call last):
File "d:\program files\python38\lib\tkinter_init_.py", line 1892, in __call
__
return self.func(*args)
File "d:\program files\python38\lib\site-packages\untp\untp.py", line 214, in
select_file
unpacker(v, image_file=image_file, protection_key=protection_key)
File "d:\program files\python38\lib\site-packages\untp\untp.py", line 49, in u
npacker
data = dataparse.parse_file(data_file, config, extra_data_receiver)
File "d:\program files\python38\lib\site-packages\untp\dataparse.py", line 20,
in parse_file
return parse_plistdata(data)
File "d:\program files\python38\lib\site-packages\untp\dataparse.py", line 101
, in parse_plistdata
fmt = data.metadata.format
AttributeError: 'dict' object has no attribute 'metadata'
Exception in Tkinter callback
Traceback (most recent call last):
File "d:\program files\python38\lib\tkinter_init.py", line 1892, in __call
__
return self.func(*args)
File "d:\program files\python38\lib\site-packages\untp\untp.py", line 214, in
select_file
unpacker(v, image_file=image_file, protection_key=protection_key)
File "d:\program files\python38\lib\site-packages\untp\untp.py", line 49, in u
npacker
data = dataparse.parse_file(data_file, config, extra_data_receiver)
File "d:\program files\python38\lib\site-packages\untp\dataparse.py", line 20,
in parse_file
return parse_plistdata(data)
File "d:\program files\python38\lib\site-packages\untp\dataparse.py", line 101
, in parse_plistdata
fmt = data.metadata.format
AttributeError: 'dict' object has no attribute 'metadata'
Exception in Tkinter callback
Traceback (most recent call last):
File "d:\program files\python38\lib\tkinter_init.py", line 1892, in __call
__
return self.func(*args)
File "d:\program files\python38\lib\site-packages\untp\untp.py", line 214, in
select_file
unpacker(v, image_file=image_file, protection_key=protection_key)
File "d:\program files\python38\lib\site-packages\untp\untp.py", line 49, in u
npacker
data = dataparse.parse_file(data_file, config, extra_data_receiver)
File "d:\program files\python38\lib\site-packages\untp\dataparse.py", line 20,
in parse_file
return parse_plistdata(data)
File "d:\program files\python38\lib\site-packages\untp\dataparse.py", line 101
, in parse_plistdata
fmt = _data.metadata.format
AttributeError: 'dict' object has no attribute 'metadata'
untp
Traceback (most recent call last):
File "d:\soft\miniconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "d:\soft\miniconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\soft\miniconda3\Scripts\untp.exe_main.py", line 4, in
File "d:\soft\miniconda3\lib\site-packages\untp_init.py", line 3, in
from untp import unpacker_dir, unpacker
ImportError: cannot import name 'unpacker_dir' from 'untp' (d:\soft\miniconda3\lib\site-packages\untp_init_.py)
(venv) D:\Users\h5osir\PycharmProjects\plistToPNG3>pip install untp
Collecting untp
Using cached untp-1.1.7-py2.py3-none-any.whl (9.7 kB)
Collecting Pillow
Using cached Pillow-7.2.0-cp37-cp37m-win_amd64.whl (2.1 MB)
Processing c:\users\h5osir\appdata\local\pip\cache\wheels\d7\b3\1d\5c94c64413b2212f64a297c92f11edd45e4474d08d0220a008\parse-1.15.0-py3-none-any.whl
Installing collected packages: Pillow, parse, untp
Successfully installed Pillow-7.2.0 parse-1.15.0 untp-1.1.7
(venv) D:\Users\h5osir\PycharmProjects\plistToPNG3>untp
Traceback (most recent call last):
File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Users\h5osir\PycharmProjects\plistToPNG3\venv\Scripts\untp.exe_main.py", line 4, in
File "d:\users\h5osir\pycharmprojects\plisttopng3\venv\lib\site-packages\untp_init.py", line 3, in
from untp import unpacker_dir, unpacker
ImportError: cannot import name 'unpacker_dir' from 'untp' (d:\users\h5osir\pycharmprojects\plisttopng3\venv\lib\site-packages\untp_init_.py)
解析某些plist的时候会报错,我是美术不懂代码,我也看不懂。能解答一下吗。代码如下。
Traceback (most recent call last):
归档.zip
File "/usr/local/bin/untp", line 11, in
sys.exit(main())
File "/Library/Python/2.7/site-packages/untp/untp.py", line 246, in main
return unpacker(argument.path, image_file = argument.image_file, output_dir = argument.output)
File "/Library/Python/2.7/site-packages/untp/untp.py", line 104, in unpacker
dst_image.save(output_path)
File "/Library/Python/2.7/site-packages/PIL/Image.py", line 1915, in save
raise ValueError('unknown file extension: {}'.format(ext))
ValueError: unknown file extension:
附件里有.plist 和 .png
Traceback (most recent call last):
File "src/untp.py", line 72, in <module>
main()
File "src/untp.py", line 69, in main
return unpacker(plist_file, image_file)
File "src/untp.py", line 14, in unpacker
except (Exception, e):
NameError: global name 'e' is not defined
Can you fix please? Thank you! :)
Thank you first for this tool, and I find there is another issue:)
If the pvr.ccz has transparent pixels, after unpacking, all the pngs' transparent pixels are missing.
I will send the plist and png files to your email([email protected];).
维护一些年代久远的项目的时候,
发现plist和png有点对不上
各种报No such file or directory:'xxxx.png'的错误
可不可以直接忽略这类错误,只处理plist里能找到的图片.
在plist里面一个个对照着删略繁琐....
File "/usr/local/bin/untp", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/untp/untp.py", line 244, in main
return unpacker(argument.path, image_file = argument.image_file, output_dir = argument.output, protection_key = argument.protection)
File "/usr/local/lib/python2.7/site-packages/untp/untp.py", line 94, in unpacker
dst_image.save(output_path)
File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 1950, in save
save_handler(self, fp, filename)
File "/usr/local/lib/python2.7/site-packages/PIL/JpegImagePlugin.py", line 623, in _save
raise IOError("cannot write mode %s as JPEG" % im.mode)
IOError: cannot write mode RGBA as JPEG```
Traceback (most recent call last):
File "/usr/local/bin/untp", line 9, in
load_entry_point('untp==1.1.5', 'console_scripts', 'untp')()
File "build/bdist.macosx-10.13-intel/egg/untp/untp.py", line 249, in main
File "build/bdist.macosx-10.13-intel/egg/untp/untp.py", line 55, in unpacker
File "build/bdist.macosx-10.13-intel/egg/untp/dataparse.py", line 20, in parse_file
File "build/bdist.macosx-10.13-intel/egg/untp/dataparse.py", line 171, in parse_plistdata
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 301, in getattr
raise AttributeError, attr
AttributeError: textureFileName
File "/usr/local/bin/untp", line 9, in
load_entry_point('untp==1.0.5', 'console_scripts', 'untp')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2697, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2370, in load
return self.resolve()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2376, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
ImportError: No module named untp
Using python 3.10: after pip install untp
untp -h
: `Traceback (most recent call last):
File "D:\Python\Python310\lib\site-packages\untp_init_.py", line 4, in
from untp import unpacker_dir, unpacker
ImportError: cannot import name 'unpacker_dir' from partially initialized module 'untp' (most likely due to a circular import) (D:\Python\Python310\lib\site-packages\untp_init_.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Python\Python310\lib\site-packages\untp\untp.py", line 12, in
from . import dataparse
File "D:\Python\Python310\lib\site-packages\untp\dataparse.py", line 8, in
from plistlib import readPlist
ImportError: cannot import name 'readPlist' from 'plistlib' (D:\Python\Python310\lib\plistlib.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "D:\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "D:\Python\Python310\Scripts\untp.exe_main.py", line 4, in
File "D:\Python\Python310\lib\site-packages\untp_init.py", line 6, in
from untp.untp import unpacker_dir, unpacker
File "D:\Python\Python310\lib\site-packages\untp\untp.py", line 14, in
import dataparse
ModuleNotFoundError: No module named 'dataparse'`
Using python 3.7, clone from github, python.exe untp/setup.py install
: running install D:\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( D:\Python\Python310\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( running bdist_egg error: error in 'egg_base' option: 'src' does not exist or is not a directory
Any help?
Traceback (most recent call last):
File "/usr/local/bin/untp", line 9, in
load_entry_point('untp==1.0.3', 'console_scripts', 'untp')()
File "/Library/Python/2.7/site-packages/untp-1.0.3-py2.7.egg/EGG-INFO/scripts/untp.py", line 97, in main
UnboundLocalError: local variable 'currten_path' referenced before assignment
If the pvr.ccz has been protected with a key, untp can't convert it to png successfully.
And I check the untp sources and the usage of TexturePacker, it has a "--content-protection" option, but this option looks like for encrypting the pvr.ccz, other than decryption.
Do you have some idea? Thank you!
There are some features in my mind:
That means if there exists xxx.png
and xxx-alpha.png
, will merge them first, then unpack. You may need specify the alpha image suffix.
I think this is a awesome feature, sometimes you doesn't have plist file, this feature will help a lot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.