GAMS-dev / gamspy

Python-based algebraic modeling interface to GAMS
Other
41 stars 2 forks source link

`gamspy install license` broken with release 0.13.0 #5

Closed grecht closed 3 months ago

grecht commented 3 months ago

I upgraded to version 0.13.0 and ran gamspy install license, but it failed (see traceback below). Downgraded to 0.12.7 and the same command is working.

Traceback (most recent call last):
  File "C:\ProgramData\mambaforge\envs\langbench\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\ProgramData\mambaforge\envs\langbench\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\mambaforge\envs\langbench\Scripts\gamspy.exe\__main__.py", line 7, in <module>
  File "C:\ProgramData\mambaforge\envs\langbench\lib\site-packages\gamspy\_cli\cmdline.py", line 479, in main
    install(args)
  File "C:\ProgramData\mambaforge\envs\langbench\lib\site-packages\gamspy\_cli\cmdline.py", line 278, in install
    install_license(args)
  File "C:\ProgramData\mambaforge\envs\langbench\lib\site-packages\gamspy\_cli\cmdline.py", line 148, in install_license
    raise ValidationError(process.stderr)
gamspy.exceptions.ValidationError: The license ID used is not valid
Error: Failed to obtain license
mabdullahsoyturk commented 3 months ago

With 0.13.0, you can now provide an ALP id (it's a 36 character identification number) instead of a license file. You can get the alp id from support@gams.com.

grecht commented 3 months ago

Great, thanks!

grecht commented 3 months ago

Thanks for adding back the old way of adding the license! However, now my non-demo license is apparently interpreted as a demo license, leading to a licensing error. Again, downgrading to 0.12.7 removed the issue. I updated to 0.13.1 and installed the license. I checked the license file in gamspy_base, it is correct. With the same license file I can solve the same model in pure GAMS, so it should be working. I looked at the listing file and found this line, seems like it might be relevant: **** IncrementalMode=1 downgrades license to demo license

The error message after building:

*** The model exceeds the demo license limits for linear models of more than 2000 rows or columns
*** Status: Terminated due to a licensing error
***         License file: C:\ProgramData\mambaforge\envs\langbench\Lib\site-packages\gamspy_base\user_license.txt
***         Inspect listing file for more information.
mbussieck commented 3 months ago

GAMS ≠ GAMSPy! So your GAMS license won't work properly for GAMSPy (and vice versa). We (GAMS Corp.) are giving GAMSPy licenses away for free if you have a full GAMS license (and in many other cases). Please contact sales or support @gams.com (with your GAMS license) to arrange for the delivery of such a GAMSPy license.