Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: pysolfc command not found (Read 1238 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

pysolfc command not found

Over the past few days I can no longer run the game pysolfc.

Having checked the Arch packages web site I've noticed that the app is deemed out of date as at 15 November 2019.

The app is installed but when running from the command line it states "command not found".  If it is installed, why can it not find the command? Does Arch / Artix prevent the app from running when classed as out of date?

Re: pysolfc command not found

Reply #1
Installed it out of curiosity, and I'm getting:
Code: [Select]
% 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'
Which apparently is because python-3.8 has deprecated time.clock(). This has to be fixed upstream or you could try fixing it yourself by updating the clock function. I'm not sure though why your executable has vanished.

Re: pysolfc command not found

Reply #2
Quote
try fixing it yourself by updating the clock function
specifically:
/usr/lib/python3.8/site-packages/pysollib/mfxutil.py
line: 146
change:
uclock = time.clock
to
uclock = time.perf_counter
works!
thanks for the hint , nous
(and the executable isn't missing, it's just not called pysolfc)

Re: pysolfc command not found

Reply #3
specifically:
/usr/lib/python3.8/site-packages/pysollib/mfxutil.py
line: 146
change:
uclock = time.clock
to
uclock = time.perf_counter
works!
thanks for the hint , nous
(and the executable isn't missing, it's just not called pysolfc)
I have done thank you.

Re: pysolfc command not found

Reply #4
Installed it out of curiosity, and I'm getting:
Code: [Select]
% 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'
Which apparently is because python-3.8 has deprecated time.clock(). This has to be fixed upstream or you could try fixing it yourself by updating the clock function. I'm not sure though why your executable has vanished.
I was typing the wrong command.  I should have been typing pysol not pysolfc.

I fixed it by following instructions here

Re: pysolfc command not found

Reply #5
further info: https://github.com/shlomif/PySolFC/issues/145
Quote
This was fixed in git master, and arch linux should use a downstream patch. It
sucks that python keeps breaking back compat but it could be much worse: