You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sage: print(os.system('which phc') + ' PHC needs to be installed and in your path')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-f9a470112020> in <module>()
----> 1 print(os.system('which phc') + ' PHC needs to be installed and in your path')
TypeError: unsupported operand type(s) for +: 'int' and 'str'
sage: os.system('which phc')
256
if e:
from sage.misc.sage_ostools import have_program
if not have_program('phc'):
print(os.system('which phc') + ' PHC needs to be installed and in your path')
raise RuntimeError
# todo -- why? etc.
with open(log_filename) as f:
msg = f.read()
raise RuntimeError(msg + "\nError running phc.")
But it is never tested because all the optional tests are, well, optional! Anyway, the fix should be pretty easy, make it a string - presumably something left over from the py3 switch.
But we should also test this, somehow. How do you test for when a package is not installed?
Hilarious! I probably saw that email and said, "I don't know anything about PHC" and ignored it ... please accept my apologies, and thanks for fixing it!
Though my comment about testing still stands ... is there some ticket open about testing for the non-presence of a package? This is a desideratum. I can open one if you don't know of one.
While trying to fix things on https://wiki.sagemath.org/interact/algebra I noticed the following problem if one doesn't have PHC installed:
This is from https://github.com/sagemath/sage-prod/blob/develop/src/sage/interfaces/phc.py#L939
But it is never tested because all the optional tests are, well, optional! Anyway, the fix should be pretty easy, make it a string - presumably something left over from the py3 switch.
But we should also test this, somehow. How do you test for when a package is not installed?
Component: interfaces
Issue created by migration from https://trac.sagemath.org/ticket/29179
The text was updated successfully, but these errors were encountered: