PDA

View Full Version : PySol crashes on any game other than Klondike



martypants
16th June 2009, 02:03 AM
Yeah, I know it isn't the most important thing, but PySol crashes on me when I try to select
any other game other than the one that load by default.

I got hooked on PySol's version of freecell and now it doesn't work. When I run it in a terminal, I get this:


/usr/lib/python2.6/site-packages/pysollib/init.py:156: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module.
pin, pout, perr = os.popen3(settings.FCS_COMMAND+' --help')
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pysollib/pysolaudio.py", line 349, in playLoop
audiodev = ossaudiodev.open('w')
IOError: [Errno 2] No such file or directory: '/dev/dsp'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pysollib/pysolaudio.py", line 369, in play
audiodev = ossaudiodev.open('w')
IOError: [Errno 2] No such file or directory: '/dev/dsp'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pysollib/pysolaudio.py", line 369, in play
audiodev = ossaudiodev.open('w')
IOError: [Errno 2] No such file or directory: '/dev/dsp'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pysollib/app.py", line 529, in mainloop
self.runGame(id, random)
File "/usr/lib/python2.6/site-packages/pysollib/app.py", line 626, in runGame
self.menubar.updateFavoriteGamesMenu()
File "/usr/lib/python2.6/site-packages/pysollib/tile/menubar.py", line 884, in updateFavoriteGamesMenu
self.updateGamesMenu(submenu, games)
File "/usr/lib/python2.6/site-packages/pysollib/tile/menubar.py", line 809, in updateGamesMenu
menu.delete(0, 'last')
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 2670, in delete
if c in self._tclCommands:
TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/usr/share/PySolFC/pysol.py", line 32, in <module>
sys.exit(main(sys.argv))
File "/usr/lib/python2.6/site-packages/pysollib/main.py", line 374, in main
app.mainloop()
File "/usr/lib/python2.6/site-packages/pysollib/app.py", line 529, in mainloop
self.runGame(id, random)
File "/usr/lib/python2.6/site-packages/pysollib/app.py", line 626, in runGame
self.menubar.updateFavoriteGamesMenu()
File "/usr/lib/python2.6/site-packages/pysollib/tile/menubar.py", line 884, in updateFavoriteGamesMenu
self.updateGamesMenu(submenu, games)
File "/usr/lib/python2.6/site-packages/pysollib/tile/menubar.py", line 809, in updateGamesMenu
menu.delete(0, 'last')
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 2670, in delete
if c in self._tclCommands:
TypeError: argument of type 'NoneType' is not iterable


What is /dev/dsp and whay would a game need such?
Any ideas?

I'm running the latest F11 stuff

cparte01
30th June 2009, 08:35 PM
I am having the exact same problem.

sideways
1st July 2009, 02:37 AM
you can fix it by editing /usr/lib/python2.6/lib-tk/Tkinter.py (or /usr/lib64/python... for x86_64), and changing line 2670 from

if c in self._tclCommands:

to

if c and c in self._tclCommands:

The /dev/dsp error can be fixed with (as root)

modprobe snd-pcm-oss

martypants
1st July 2009, 02:13 PM
That did the trick for sure. Many thanks. Hours of mindless freecell ahead!

One question, though: how'd you catch that error? That was buried pretty deep. :)

Cheers,
Marty

sideways
1st July 2009, 03:10 PM
That did the trick for sure. Many thanks. Hours of mindless freecell ahead!

One question, though: how'd you catch that error? That was buried pretty deep. :)

Cheers,
Marty

The final line of error message does suggest line 2670 is the cause.

There's a proper patch to tkinter on the python bug list http://bugs.python.org/issue3774.

This is just a simple alternative quickfix mentioned in the discussion

thedigjam
12th August 2009, 07:13 AM
How do I get permission to make these changes? I'm very new to Linux and I am running Fedora 11. Thanks

Hlingler
12th August 2009, 08:15 AM
How do I get permission to make these changes?Open a terminal window, and log in as root user. Then open a text editor (your choice) and edit the specified file as shown in Post#3.

Run the modprobe command as shown in Post #3 as root user.

V

dsteckel1
21st August 2009, 07:46 PM
thanks, i had the same problem. it works

drelanger
5th September 2009, 08:31 PM
Although my english is very bad, linux newcomer, using Open Suse, opened for the first time a console and finally found kate as texteditor, after two hours triing and retriing hoping not to damage my system I was finally successful. Pysol doesn't crash any more and I can choose the games. Thank you very much this was very helpful. Many greetings from France E. Langer

scottro
6th September 2009, 02:02 AM
Thanks Goedel. I was having the same problem.