Dear, Juan J. Martínez
Thank you very much for your help.
I use IPython notebook.
******Version 1.2alpha Pyglet ( Install with "pip install cocos2d --user
--process-dependency-links" command )
In [1]:
import pyglet
In [2]:
pyglet.resource.image("x.png")
Out[2]:
---------------------------------------------------------------------------
ResourceNotFoundException Traceback (most recent call last)
<ipython-input-2-fadaa8f003cf> in <module>()
----> 1 pyglet.resource.image("x.png")
/home/hogehoge/.local/lib/python2.7/site-packages/pyglet/resource.pyc in
image(self, name, flip_x, flip_y, rotate, atlas)
526 else:
527 identity = self._cached_images[name] =
self._alloc_image(name,
--> 528 atlas=atlas)
529
530 if not rotate and not flip_x and not flip_y:
/home/hogehoge/.local/lib/python2.7/site-packages/pyglet/resource.pyc in
_alloc_image(self, name, atlas)
455
456 def _alloc_image(self, name, atlas=True):
--> 457 file = self.file(name)
458 try:
459 img = pyglet.image.load(name, file=file)
/home/hogehoge/.local/lib/python2.7/site-packages/pyglet/resource.pyc in
file(self, name, mode)
411 return location.open(name, mode)
412 except KeyError:
--> 413 raise ResourceNotFoundException(name)
414
415 def location(self, name):
ResourceNotFoundException: Resource "x.png" was not found on the path. Ensure
that the filename has the correct captialisation.
In [3]:
pyglet.resource.path
Out[3]:
['.']
****** with version 1.1.4 Pyglet ( Debian Package, I remove version
1.2alpha package with rm "~/.local" command )
In [1]:
import pyglet
In [2]:
pyglet.resource.image("x.png")
Out[2]:
<TextureRegion 50x38>
In [3]:
pyglet.resource.path
Out[3]:
['.']
With best regards
buynnnmmm1
2014年10月3日金曜日 22時30分43秒 UTC+9 Juan J. Martínez:
>
> On 03/10/14 14:29, buynnnmmm1 wrote:
> > Dear Vim.
> >
> > Thank you very much for your help.
> >
> > I miss spell in this forum. But I don't miss spell in the source code.
> >
> > pyglet.resource.image("x.png")
> >
> > I check this code with version 1.1.4 Pyglet, and it had no error.
> > With version. 1.2alpha Pyglet, An error will be generated at that line.
> >
>
> It would be really helpful if you could provide the exact error. Just
> copy the traceback and send it to the list :)
>
> Regards,
>
> Juan
>
>
>
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.