Test modelΒΆ

import gsapy as gp

model = gp.GSA("test.gwb")
model.get_nodes("25 to 32")
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
File C:\actions-runner\_work\gsapy\gsapy\gsapy\__init__.py:1819, in GSA.__init__(self, path, version)
   1818 self.log.info("Try initialise GSA object by version")
-> 1819 self.gsa = CreateObject(f"Gsa_{major}_{minor}.ComAuto", CLSCTX_LOCAL_SERVER)
   1820 self.log.info("Successfully created GSA object by version")

File C:\actions-runner\_work\_tool\Python\3.11.9\x64\Lib\site-packages\comtypes\client\__init__.py:267, in CreateObject(progid, clsctx, machine, interface, dynamic, pServerInfo)
    264     logger.debug(
    265         "CoCreateInstance(%s, clsctx=%s, interface=%s)", clsid, clsctx, interface
    266     )
--> 267     obj = comtypes.CoCreateInstance(clsid, clsctx=clsctx, interface=interface)
    268 else:

File C:\actions-runner\_work\_tool\Python\3.11.9\x64\Lib\site-packages\comtypes\_post_coinit\misc.py:137, in CoCreateInstance(clsid, interface, clsctx, punkouter)
    136 iid = interface._iid_
--> 137 _ole32.CoCreateInstance(byref(clsid), punkouter, clsctx, byref(iid), byref(p))
    138 return p

File _ctypes/callproc.c:1000, in GetResult()

OSError: [WinError -2146959355] Server execution failed

The above exception was the direct cause of the following exception:

GSAError                                  Traceback (most recent call last)
Cell In[1], line 3
      1 import gsapy as gp
----> 3 model = gp.GSA("test.gwb")
      4 model.get_nodes("25 to 32")

File C:\actions-runner\_work\gsapy\gsapy\gsapy\__init__.py:1822, in GSA.__init__(self, path, version)
   1820         self.log.info("Successfully created GSA object by version")
   1821     except OSError as ose:
-> 1822         raise GSAError(f"GSA Version {version} is not installed or registered on this computer.") from ose
   1824 structs.initialize(self.gsa.__com_interface__.__module__)
   1826 feature_description = f"gsapy::{__version__}"

GSAError: GSA Version 10.2 is not installed or registered on this computer.