Resource Not Found Exception in pyglet -


i'm using python 2.6.6 , pyglet 1.1.4. in "erosion" folder, have "erosion.py" , folder named "images." inside images, there .png images. 1 image named "guard.png."

in "erosion.py" there segment goes so:

pyglet.resource.path = ['images'] pyglet.resource.reindex() self.image = pyglet.resource.image('%s%s' % (character, '.png')) 

when run this, given

file "c:\python26\lib\site-packages\pyglet\resource.py", line 394, in file raise resourcenotfoundexception(name) resourcenotfoundexception: resource "guard.png" not found on path.  ensure filename has correct captialisation. 

i have tried changing path ['./images'] , ['../images']. i've tried removing path , reindex call , putting erosion.py , guard.png in same folder.

this able load resources:

pyglet.resource.path = ['c:\\users\\myname\\downloads\\temp'] pyglet.resource.reindex()  pic = pyglet.resource.image('1.jpg')  texture = pic.get_texture() gl.gltexparameteri(gl.gl_texture_2d, gl.gl_texture_mag_filter, gl.gl_nearest)  texture.width = 960 texture.height = 720  texture.blit(0, 0, 0) 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -