Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Augment timeout when starting a server #626

Merged
merged 2 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ansys/dpf/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
object_handler
)

try:
from grpc import _channel # noqa: F401
# weirdly necessary to delete LegacyGrpcError
except ImportError:
pass

LOG = logging.getLogger(__name__)
LOG.setLevel("DEBUG")

Expand Down
4 changes: 2 additions & 2 deletions ansys/dpf/core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,9 @@ def _load_result_info(self):
op.inputs.connect(self._stream_provider.outputs)
try:
result_info = op.get_output(0, types.result_info)
except _InactiveRpcError as e:
except Exception as e:
# give the user a more helpful error
if "results file is not defined in the Data sources" in e.details():
if "results file is not defined in the Data sources" in e.args():
raise RuntimeError("Unable to open result file") from None
else:
raise e
Expand Down
2 changes: 1 addition & 1 deletion ansys/dpf/core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def start_local_server(
load_operators=True,
use_docker_by_default=True,
docker_config=RUNNING_DOCKER,
timeout=5.,
timeout=20.,
config=None,
use_pypim_by_default=True
):
Expand Down