When there is an invalid license file, an attempt to create an AMPL object fails with this message:
C:\Users\Robert\Desktop\Solvers>python
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from amplpy import AMPL
>>> ampl = AMPL()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\4er\AppData\Local\Programs\Python\Python37\lib\site-packages\amplpy\ampl.py", line 85, in __init__
self._impl = amplpython.AMPL()
SystemError: License not valid.
Message:38 error_ampl_lic
License file ampl.lic:
>>>
But when an attempt is made to start AMPL from the command line, with the same invalid license file, a lot of valuable diagnostic information is provided (which often enables the licensing problem to be fixed immediately):
Note that License file ampl.lic: is the last line of the amplpy error message, but is only the first line of the message from command-line AMPL. Can amplpy instead display all of the license error message that would appear at the command line?
When there is an invalid license file, an attempt to create an AMPL object fails with this message:
But when an attempt is made to start AMPL from the command line, with the same invalid license file, a lot of valuable diagnostic information is provided (which often enables the licensing problem to be fixed immediately):
Note that
License file ampl.lic:
is the last line of the amplpy error message, but is only the first line of the message from command-line AMPL. Can amplpy instead display all of the license error message that would appear at the command line?