When using KeyboardInterrupt (Ctrl+C) to end osl, the optiSLang process is killed, but the __refresh_listener_registration
is still active causing OslCommunicationErrors
#46
Labels
bug
Something isn't working
osl = Optislang(project_path = "/tmp/sc.opf")
^C
KeyboardInterrupt
Exception in thread Thread-1:
Traceback (most recent call last):
File "/homelocal/fahlberg/develop/sandbox/git/protos/optiSLang/dist/lib/python3.7/lib/python3.7/site-packages/ansys/optislang/core/tcp_osl_server.py", line 1600, in _send_command
self.__host, self.__port, timeout=_get_current_timeout(self.__timeout, start_time)
File "/homelocal/fahlberg/develop/sandbox/git/protos/optiSLang/dist/lib/python3.7/lib/python3.7/site-packages/ansys/optislang/core/tcp_osl_server.py", line 182, in connect
f"Connection could not be established to host {host} and port {port}."
ConnectionRefusedError: Connection could not be established to host 127.0.0.1 and port 5310.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/homelocal/fahlberg/develop/sandbox/git/protos/optiSLang/dist/lib/python3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/homelocal/fahlberg/develop/sandbox/git/protos/optiSLang/dist/lib/python3.7/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/homelocal/fahlberg/develop/sandbox/git/protos/optiSLang/dist/lib/python3.7/lib/python3.7/site-packages/ansys/optislang/core/tcp_osl_server.py", line 1560, in __refresh_listener_registration
uid=self.__listener_uid, password=self.__password
File "/homelocal/fahlberg/develop/sandbox/git/protos/optiSLang/dist/lib/python3.7/lib/python3.7/site-packages/ansys/optislang/core/tcp_osl_server.py", line 1612, in _send_command
) from ex
ansys.optislang.core.errors.OslCommunicationError: An error occurred while communicating with the optiSLang server.
Originally posted by @rfahlberg in #39 (comment)
The text was updated successfully, but these errors were encountered: