i have been trying to get Tkinter to play a sound, however, tkSnack has brought me to this random error which i can't emplane, but i think its something to do with my operating system, ubuntu.

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "alarmClock.pyw", line 62, in run
  File "/var/lib/python-support/python2.5/tkSnack.py", line 274, in play
    self.tk.call((self.name, 'play') + self._options(kw))
TclError: Could not gain access to /dev/sound/dsp for writing.

that file does not exsist, however, /dev/dsp does.
Thanks, The-IT

7 Years
Discussion Span
Last Post by Brionius

I don't know if you still need to know this, but I thought I'd post a solution I figured out in case anyone else runs into this problem. This is ubuntu-specific (maybe it'd work on other flavors of linux too).

cd /dev/sound      
# that was to make sure /dev/sound doesn't already exist (you should get an error) - if it does, abort, and do not continue with these directions.
sudo mkdir /dev/sound
sudo ln -s /dev/dsp /dev/sound/dsp

It worked from then on. I don't know why, for some reason tkSnack is convinced that my sound device was located at /dev/sound/dsp, so I just make a symbolic link at that location to my actual sound device, which is at /dev/dsp.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.