PyOptiSLang: RuntimeError: Cannot get optiSLang server port.

Options
Daniel Arnold
Daniel Arnold Member, Employee Posts: 9
Name Dropper First Comment First Anniversary Ansys Employee

I get the following error when instantiating a Optislang class with PyOptiSLang: RuntimeError: Cannot get optiSLang server port.

Answers

  • Daniel Arnold
    Daniel Arnold Member, Employee Posts: 9
    Name Dropper First Comment First Anniversary Ansys Employee
    Options

    Sometimes the optiSLang server is responding to slow. Please try to increase the initial timeout with ini_timeout argument. Further debug logging can be added with loglevel='Debug':

    from ansys.optislang.core import Optislang
    osl = Optislang(
        ini_timeout = 120,
        loglevel = 'Debug'
    )
    print(osl)
    osl.dispose()