title: Pyglet file name "Resource not found"
body: <p>I'm trying to open a music track and add it to a queue for a player in Pyglet.</p>
  
  <pre><code>    def QueueAudio(self):
          self.musicpath=filedialog.askopenfilename()
          print(self.musicpath)
          Player.queue(pyglet.resource.media(r"self.musicpath"))
  </code></pre>
  
  <p>The musicpath variable works fine as the print statement prints the filename. The error comes when the player tries to queue the track. Error below.</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Python33\lib\site-packages\pyglet\resource.py", line 605, in media
      location = self._index[name]
  KeyError: 'self.musicpath'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "C:\Python33\lib\tkinter\__init__.py", line 1475, in __call__
      return self.func(*args)
    File "C:\Users\Rob\Google Drive\Coursework\Part 2\music player tests\test5.py", line 99, in QueueAudio
      self.playerpath=pyglet.resource.media(r"self.musicpath")
    File "C:\Python33\lib\site-packages\pyglet\resource.py", line 615, in media
      raise ResourceNotFoundException(name)
  pyglet.resource.ResourceNotFoundException: Resource "self.musicpath" was not found on the path.  Ensure that the filename has the correct captialisation.
  </code></pre>
  
  <p>Does anyone know why this is, and what may fix it?</p>