Connection through Spyder, target machine actively refused
I've tried the client with Visual Studio Code and Spyder. With VSC everything works fine, but with Spyder, RFEM6 doesn't get 'released' after setting up the model. A connection with RFEM6 is made, and the model gets build. Also the modelStatus is imported again. However RFEM6 stays locked by the Spyder application and you have to abort the session. After running the script again I get the following:
basename: temp.py dirname: c:\users\thijs.schuiling.spyder-py3 Length of the cantilever in m: 10 Force in kN: 5
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.dlubal.com/rfem.xsd"> SOAP-ENV:Header/ ns0:Body ns1:delete_all_results/ </ns0:Body> </SOAP-ENV:Envelope> Traceback (most recent call last):
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py:199 in _new_conn sock = connection.create_connection(
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\connection.py:85 in create_connection raise err
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\connection.py:73 in create_connection sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py:789 in urlopen response = self._make_request(
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py:495 in _make_request conn.request(
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py:441 in request self.endheaders()
File ~\AppData\Local\anaconda3\Lib\http\client.py:1331 in endheaders self._send_output(message_body, encode_chunked=encode_chunked)
File ~\AppData\Local\anaconda3\Lib\http\client.py:1091 in _send_output self.send(msg)
File ~\AppData\Local\anaconda3\Lib\http\client.py:1035 in send self.connect()
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py:279 in connect self.sock = self._new_conn()
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py:214 in _new_conn raise NewConnectionError(
NewConnectionError: <urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File ~\AppData\Local\anaconda3\Lib\site-packages\requests\adapters.py:667 in send resp = conn.urlopen(
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py:843 in urlopen retries = retries.increment(
File ~\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\retry.py:519 in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8082): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\AppData\Local\anaconda3\Lib\site-packages\RFEM\suds_requests.py:30 in wrapper return f(*args, **kwargs)
File ~\AppData\Local\anaconda3\Lib\site-packages\RFEM\suds_requests.py:67 in send resp = self._session.post(
File ~\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py:637 in post return self.request("POST", url, data=data, json=json, **kwargs)
File ~\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py:589 in request resp = self.send(prep, **send_kwargs)
File ~\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py:703 in send r = adapter.send(request, **kwargs)
File ~\AppData\Local\anaconda3\Lib\site-packages\requests\adapters.py:700 in send raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8082): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\AppData\Local\anaconda3\Lib\site-packages\suds\client.py:652 in send reply = transport.send(request)
File ~\AppData\Local\anaconda3\Lib\site-packages\RFEM\suds_requests.py:40 in wrapper raise transport.TransportError(
TransportError: Error in requests Traceback (most recent call last): File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py", line 199, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection raise err File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 789, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 495, in _make_request conn.request( File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py", line 441, in request self.endheaders() File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\http\client.py", line 1331, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\http\client.py", line 1091, in _send_output self.send(msg) File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\http\client.py", line 1035, in send self.connect() File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py", line 279, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py", line 214, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8082): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\RFEM\suds_requests.py", line 30, in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\RFEM\suds_requests.py", line 67, in send resp = self._session.post( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8082): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\AppData\Local\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec exec(code, globals, locals)
File c:\users\thijs.schuiling.spyder-py3\temp.py:27 Model(True, "Demo1") # crete new model called Demo1
File ~\AppData\Local\anaconda3\Lib\site-packages\RFEM\initModel.py:166 in init cModel.service.delete_all_results()
File ~\AppData\Local\anaconda3\Lib\site-packages\suds\client.py:559 in call return client.invoke(args, kwargs)
File ~\AppData\Local\anaconda3\Lib\site-packages\suds\client.py:618 in invoke result = self.send(soapenv)
File ~\AppData\Local\anaconda3\Lib\site-packages\suds\client.py:664 in send result = self.failed(binding, e)
File ~\AppData\Local\anaconda3\Lib\site-packages\suds\client.py:726 in failed raise Exception((status, reason))
Exception: (0, 'Error in requests\nTraceback (most recent call last):\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py", line 199, in _new_conn\n sock = connection.create_connection(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection\n raise err\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\connection.py", line 73, in create_connection\n sock.connect(sa)\nConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 789, in urlopen\n response = self._make_request(\n ^^^^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 495, in _make_request\n conn.request(\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py", line 441, in request\n self.endheaders()\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\http\client.py", line 1331, in endheaders\n self._send_output(message_body, encode_chunked=encode_chunked)\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\http\client.py", line 1091, in _send_output\n self.send(msg)\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\http\client.py", line 1035, in send\n self.connect()\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py", line 279, in connect\n self.sock = self._new_conn()\n ^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connection.py", line 214, in _new_conn\n raise NewConnectionError(\nurllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\adapters.py", line 667, in send\n resp = conn.urlopen(\n ^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen\n retries = retries.increment(\n ^^^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\urllib3\util\retry.py", line 519, in increment\n raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nurllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8082): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\RFEM\suds_requests.py", line 30, in wrapper\n return f(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\RFEM\suds_requests.py", line 67, in send\n resp = self._session.post(\n ^^^^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py", line 637, in post\n return self.request("POST", url, data=data, json=json, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py", line 589, in request\n resp = self.send(prep, **send_kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\sessions.py", line 703, in send\n r = adapter.send(request, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Users\thijs.schuiling\AppData\Local\anaconda3\Lib\site-packages\requests\adapters.py", line 700, in send\n raise ConnectionError(e, request=request)\nrequests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8082): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000170D4043FE0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))\n')