So, I was finally dusting my old pyglet skills after a good, long
while of not using them and ended up stumbling into this weird,
bizarre problem, even with the bundled examples for pyglet 1.1.4.
All I ever wanted was to show an image on screen, period. I've done
weirder things.
Here's the code that mostly about everyone should be familiar with:
----------------------------------------
import pyglet
window = pyglet.window.Window()
image = pyglet.resource.image('kitten.jpg')
@window.event
def on_draw():
window.clear()
image.blit(0, 0)
pyglet.app.run()
------------------------------------
And here's the error message:
-----------------------------------------------
Traceback (most recent call last):
File "C:\Users\alejandro\Downloads\pyglet-1.1.4-docs\examples
\programming_guide\image_viewer.py", line 45, in <module>
image = pyglet.resource.image('kitten.jpg')
File "C:\Python26\lib\site-packages\pyglet\resource.py", line 492,
in image
identity = self._cached_images[name] = self._alloc_image(name)
File "C:\Python26\lib\site-packages\pyglet\resource.py", line 436,
in _alloc_image
file = self.file(name)
File "C:\Python26\lib\site-packages\pyglet\resource.py", line 394,
in file
raise ResourceNotFoundException(name)
ResourceNotFoundException: Resource "kitten.jpg" was not found on the
path. Ensure that the filename has the correct captialisation.
-----------------------------------------------
The odd thing is that if I double-click on the file, it executes and
shows the image of the kitty, not a problem.
Weird, I say.
I don't know if the problem is with IDLE, or the version number
(1.1.4), or my OS (Vista, 64 bits)...or a combination of all of those.
I've done this a million times, and I don't know what could be wrong.
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en.