Open greschd opened 1 year ago
You get this error because the MaterialSupport is not available in python. It would be nice if the error message could be improved.
Thanks for the explanation @janvonrickenbach. Additionally, I think the generated doc-string should take into account when data is unavailable. This is why I originally expected this to work:
>>> # Get output data
>>> result_abstract_field_support = op.outputs.abstract_field_support()
EDIT: This is not really a bug, but the error message + docs could be improved. See discussion below.
Before submitting the issue
Description of the bug
When directly accessing the
.outputs.abstract_field_support()
of amaterial_support_provider
, the following exception is raised:When instead passing the
material_support_provider
as input to other operators, things appear to work as expected, see https://composites.dpf.docs.pyansys.com/version/stable/examples/gallery_examples/dpf_composite_failure_workflow.html#set-up-providersSteps To Reproduce
pip install ansys-dpf-core
Run the following code:
Which Operating System causes the issue?
Windows
Which DPF/Ansys version are you using?
DPF Server 2024R1 daily.
Which Python version causes the issue?
3.10
Installed packages
ansys-dpf-core==0.8.1 ansys-dpf-gate==0.3.1 ansys-dpf-gatebin==0.3.1 ansys-grpc-dpf==0.7.1 cachetools==5.3.1 certifi==2023.5.7 charset-normalizer==3.1.0 colorama==0.4.6 google-api-core==2.11.0 google-api-python-client==2.88.0 google-auth==2.19.0 google-auth-httplib2==0.1.0 googleapis-common-protos==1.59.0 grpcio==1.54.2 httplib2==0.22.0 idna==3.4 importlib-metadata==6.6.0 numpy==1.24.3 packaging==23.1 protobuf==4.23.2 psutil==5.9.5 pyasn1==0.5.0 pyasn1-modules==0.3.0 pyparsing==3.0.9 requests==2.31.0 rsa==4.9 six==1.16.0 tqdm==4.65.0 uritemplate==4.1.1 urllib3==1.26.16 zipp==3.15.0