You are not logged in.

#1 2019-12-02 23:20:30

treadlefish
Member
Registered: 2009-01-24
Posts: 13

Pysolfc tkinter problem

I had to install a new hard drive. After I installed Pysolfc, I got the following message when starting the game

Traceback (most recent call last):
  File "/usr/bin/pysol", line 28, in <module>
    init()
  File "/usr/lib/python3.8/site-packages/pysollib/init.py", line 93, in init
    root = tkinter.Tk(className=pysollib.settings.TITLE)
  File "/usr/lib/python3.8/tkinter/__init__.py", line 2261, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: unknown color name "BACKGROUND"

Since I am not a programmer, I have no idea how to fix this. Problems with tcl/tk have cropped up in the past, but this is a new install with the latest updates.

Ideas?

Offline

#2 2019-12-03 00:43:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Pysolfc tkinter problem

I just tried it out to see if I could confirm, but I got a different error:

$ pysol
Traceback (most recent call last):
  File "/usr/bin/pysol", line 36, in <module>
    from pysollib.main import main  # noqa: E402,I202
  File "/usr/lib/python3.8/site-packages/pysollib/main.py", line 30, in <module>
    from pysollib.app import Application
  File "/usr/lib/python3.8/site-packages/pysollib/app.py", line 31, in <module>
    from pysollib.gamedb import GAME_DB, GI, loadGame
  File "/usr/lib/python3.8/site-packages/pysollib/gamedb.py", line 28, in <module>
    from pysollib.mfxutil import Struct, print_err
  File "/usr/lib/python3.8/site-packages/pysollib/mfxutil.py", line 146, in <module>
    uclock = time.clock
AttributeError: module 'time' has no attribute 'clock'

I'll see if I can dig into this a bit, but it seems there are problems with this package.

Well this is odd:

$ sed -n '145,150p' /usr/lib/python3.8/site-packages/pysollib/mfxutil.py
# high resolution clock() and sleep()
uclock = time.clock
usleep = time.sleep
if os.name == "posix":
    uclock = time.time

The conditional implies that the author of the code new that time.clock would not work on a posix system ... yet that was not in a `try` block or another branch of that conditional.  At least this part looks like an upstream bug, potentially due to the code being written for an older version of python.

Last edited by Trilby (2019-12-03 00:48:15)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-12-03 12:21:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: Pysolfc tkinter problem

Offline

Board footer

Powered by FluxBB