Page 1 of 1

GAMS return code not 0 (7)

Posted: Thu Oct 27, 2022 5:11 am
by Mercedes
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_GAM ... Codes.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

Re: GAMS return code not 0 (7)

Posted: Thu Oct 27, 2022 7:37 am
by bussieck
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

Re: GAMS return code not 0 (7)

Posted: Mon Oct 31, 2022 2:30 am
by Mercedes
bussieck wrote: 1 year ago 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! :D