Skip to content

Show more explicit/verbose failure information for expired GAMS license #584

@khaeru

Description

@khaeru

If GAMS is installed, the gams executable is located on the PATH or IXMP_GAMS_PATH, but the GAMS license is invalid or expired, then

ixmp/ixmp/model/gams.py

Lines 115 to 119 in d1c829a

# Parse GAMS system directory path
if match := re.search(r"^\s*SysDir (.*)", output, re.MULTILINE):
self.system_dir = Path(match.group(1))
else:
self.system_dir = Path.cwd()
falls back to Path.cwd() instead of the actual GAMS location.

This leads to later symptoms that misleadingly suggest GAMS is not installed, rather than informing of the license error.

To resolve: adjust the code to use self.executable instead of Path.cwd(), even if the run of null.gms fails.

Metadata

Metadata

Assignees

Labels

enhNew features & functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions