miroff / art-packer Goto Github PK
View Code? Open in Web Editor NEWSprite sheets generator written in python
License: Other
Sprite sheets generator written in python
License: Other
This is a minor issue, but these notes may help anyone that comes after me.
When running the script on a debian machine
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux
Using packaged python version 2.7.3
I get the following error:
Reading image resources
Packing 20 images to sprite-sheets
1.png 20 images was packed with pixel overhead of 24.19%
Traceback (most recent call last):
File "/usr/local/bin/art-packer", line 5, in
pkg_resources.run_script('artpacker==1.0.1', 'art-packer')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/artpacker-1.0.1-py2.7.egg/EGG-INFO/scripts/art-packer", line 10, in
main()
File "/usr/local/lib/python2.7/dist-packages/artpacker-1.0.1-py2.7.egg/artpacker/cli.py", line 102, in main
verbose=options.verbose).generate()
File "/usr/local/lib/python2.7/dist-packages/artpacker-1.0.1-py2.7.egg/artpacker/artpacker.py", line 91, in generate
self.metadata_saver.save({'sheets': sprite_sheets, 'sprites': metadata})
File "/usr/local/lib/python2.7/dist-packages/artpacker-1.0.1-py2.7.egg/artpacker/metadata/json.py", line 14, in save
content = BANNER + json.dumps(metadata, indent=' ')
AttributeError: 'module' object has no attribute 'dumps'
Note the last line.
Installing the debian package python-simplejson turned out to be a quick way of fixing this issue for me.
From what i can gather from this post: http://stackoverflow.com/questions/11369734/python-json-module-has-no-attribute-dumps
The reason for the error might be the compounding circumstances of having a file named json.py and not having simplejson available thus falling back on the json module. This might result in that the json.py file gets loaded incorrectly due to its name.
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.