GAMS return code not 0 (7)

Hello, I install GAMS Python API in my virtualenv, and I get this error when I run the code

File"gams\execution.py", line 905, in runraise gams.workspace.GamsExceptionExecution("GAMS return code not 0 (" + str(exitcode) + ")
gams.workspace.GamsExceptionExecution: GAMS return code not 0 (7)

I check the information about the return code (see https://www.gams.com/latest/docs/UG_GAMSReturnCodes.html), it seems like there exist a licensing error (return code 7),
but I have checked that my GAMS license is valid. Could someone tell me how to solve this problem.

Thanks

It is indeed a license error. There are many ways to debug this. Probably the easiest is to send the GAMS log to stdout and see what license is picked up by GAMS and what solver GAMS tries to execute: myjob.run(…, output=sys.stdout).

-Michael

Thanks for your answer! :smiley: