PyOptiSLang: RuntimeError: Cannot get optiSLang server port.

Daniel Arnold
Daniel Arnold Member, Employee Posts: 9
Photogenic Solution Developer Community of Practice Member Ansys Employee First Anniversary
✭✭✭

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
    Photogenic Solution Developer Community of Practice Member Ansys Employee First Anniversary
    ✭✭✭

    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()