GAMS return code not 0 (7) Topic is solved

Problems with modeling
Post Reply
Mercedes
User
User
Posts: 2
Joined: 1 year ago

GAMS return code not 0 (7)

Post 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
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: GAMS return code not 0 (7)

Post 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
Mercedes
User
User
Posts: 2
Joined: 1 year ago

Re: GAMS return code not 0 (7)

Post 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
Post Reply