ansys / pyadditive

Pythonic interface client to Ansys additive simulation service

Home Page:https://additive.docs.pyansys.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Service is intermittently unavailable immediately after local startup.

pkrull-ansys opened this issue Β· comments

πŸ” Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

Zach Anderson
Thursday 9:40 AM
Morning Pete, I am randomly running into an error when running tests, have you seen this before?

2023-10-19 09:00:37 Connected to 127.0.0.1:54985
Traceback (most recent call last):
File "C:\ARM_Reports\PY_POROSITY_SOLVER_316L_001\PY_POROSITY_SOLVER_EMPIRICAL.py", line 77, in
material = additive.get_material(material)
File "C:\WB_INSTALL\v241\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\additive\core\additive.py", line 380, in get_material
result = self._materials_stub.GetMaterial(request)
File "C:\WB_INSTALL\v241\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\grpc_channel.py", line 1161, in call
return _end_unary_response_blocking(state, call, False, None)
File "C:\WB_INSTALL\v241\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\grpc_channel.py", line 1004, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:54985: Connection refused"
debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:54985: Connection refused {created_time:"2023-10-19T13:00:39.6412211+00:00", grpc_status:14}"

[Thursday 10:47 AM] Zach Anderson
seems to be running ok when I step through it
[Thursday 10:47 AM] Zach Anderson
maybe it is a timing issue between initalizing it and running the next command
[Thursday 12:11 PM] Peter Krull
Hmmm, that shouldn't happen. Let me know if you have to put in a delay in order to get it to work reliably.
[Thursday 12:12 PM] Zach Anderson
putting in time.sleep(5) is working
[Thursday 12:12 PM] Zach Anderson
consistantly

πŸ“ Steps to reproduce

See above.

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

24.1

🐍 Which Python version are you using?

3.9

πŸ“¦ Installed packages

n/a