gams_job.interrupt() does not work in Python 3.6

Questions on using the GAMS APIs (Python, .NET, etc.)
Post Reply
serdar
User
User
Posts: 3
Joined: 5 years ago

gams_job.interrupt() does not work in Python 3.6

Post by serdar »

I create GamsJob instances to run my optimization problems and I want to be able to stop them running whenever I want. However, when i run

Code: Select all

gams_job.interrupt()
method, in Windows 10 I get the following error:

Code: Select all

ArgumentError: argument 4: <class 'OverflowError'>: int too long to convert
I tried this in Linux as well. In Linux I do not get an error but I still see GAMS running as a process when I check it with

Code: Select all

ps -aux | grep gams
Do you have any clue what the problem could be?

Many thanks in advance!
User avatar
Clemens
Posts: 57
Joined: 7 years ago

Re: gams_job.interrupt() does not work in Python 3.6

Post by Clemens »

Serdar,

This is actually a bug in the GAMS Python API. We have already fixed the bug and will publish it in the next GAMS release. Thank you very much for reporting this problem.

Best,
Clemens
AmirKh
User
User
Posts: 1
Joined: 4 years ago

Re: gams_job.interrupt() does not work in Python 3.6

Post by AmirKh »

Hi

I am trying to import data by Python in GAMS and run my model (with python).
Opening Anacondo prompt I changed the directory to C:\GAMS\win64\26.1\apifiles\Python\api_36.
After that I executed setup.py in Anaconda prompt.

However, after installing the phthon api (3.6) I execute the following:

from gams import GamsWorkspace
or
from gams import *

But I get this error:

ModuleNotFoundError: No module named 'gams'

Is this because the apis are not installed appropriately?

I will grateful for helping me with this issue
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: gams_job.interrupt() does not work in Python 3.6

Post by Renger »

Hi

Take a look at this topic: viewtopic.php?f=10&t=10592&p=25161#p25161.
Test the footnote first!
Hope this helps
CHeers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Post Reply