You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: