ansys/pyfluent

Bug located in Class SolutionVariableData

Closed this issue Β· 2 comments

πŸ” Before submitting the issue

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

🐞 Description of the bug

In the SolutionVariableData class, there is a recursive call between the get_data() function and the _update_solution_variable_info() function, and when the get_data() function is used too many times, it will trigger the system recursion limit and report an error. It can be done by adding a Validated variable in the SolutionVariableData class and doing a validation before calling _update_solution_variable_info() function.

def init(
self,
service: SolutionVariableService,
solution_variable_info: SolutionVariableInfo,
):
self.validated = False
self._service = service
self._solution_variable_info = solution_variable_info

if not self.validated:
self._update_solution_variable_info()
self.validated = True

πŸ“ Steps to reproduce

Creating a loop in which the solver.fields.solution_variable_data.get_data() function is called multiple times, it will eventually triggers the system's recursion count limit, reporting AttributeError: β€˜RecursionError’ object has no attribute β€˜ details'

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

2023R2

🐍 Which Python version are you using?

3.11

πŸ“¦ Installed packages

about-time==4.2.1
absl-py==2.0.0
alive-progress==3.1.5
ansys-api-fluent==0.3.27
ansys-api-platform-instancemanagement==1.0.0
ansys-api-tools-filetransfer==0.1.0
ansys-fluent-core==0.25.0
ansys-platform-instancemanagement==1.1.2
ansys-tools-filetransfer==0.1.0
ansys-units==0.3.2
astunparse==1.6.3
beartype==0.18.5
cachetools==5.3.2
certifi==2023.7.22
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.3.0
cycler==0.12.1
docker==7.1.0
filelock==3.9.0
flatbuffers==23.5.26
fonttools==4.53.1
fsspec==2023.4.0
gast==0.5.4
google-auth==2.23.4
google-auth-oauthlib==1.0.0
google-pasta==0.2.0
grapheme==0.6.0
grpcio==1.59.2
grpcio-health-checking==1.48.2
gym==0.7.3
h5py==3.10.0
idna==3.4
importlib-metadata==6.8.0
Jinja2==3.1.2
joblib==1.4.2
keras==2.14.0
kiwisolver==1.4.7
libclang==16.0.6
lxml==4.9.3
Markdown==3.5.1
MarkupSafe==2.1.3
matplotlib==3.9.2
ml-dtypes==0.2.0
mpmath==1.3.0
networkx==3.0
nltk==3.9.1
numpy==1.26.1
oauthlib==3.2.2
opt-einsum==3.3.0
packaging==23.2
pandas==2.1.2
Pillow==9.3.0
platformdirs==3.11.0
protobuf==3.20.3
psutil==5.9.6
pyasn1==0.5.0
pyasn1-modules==0.3.0
pyglet==2.0.14
pyparsing==3.1.4
python-dateutil==2.8.2
pytz==2023.3.post1
pywin32==306
PyYAML==6.0.1
regex==2024.7.24
requests==2.32.3
requests-oauthlib==1.3.1
rsa==4.9
scipy==1.14.1
six==1.16.0
sympy==1.12
tensorboard==2.14.1
tensorboard-data-server==0.7.2
tensorflow==2.14.0
tensorflow-estimator==2.14.0
tensorflow-intel==2.14.0
tensorflow-io-gcs-filesystem==0.31.0
termcolor==2.3.0
torch==2.1.0+cu121
torchaudio==2.1.0+cu121
torchinfo==1.8.0
torchvision==0.16.0+cu121
tqdm==4.66.5
typing_extensions==4.4.0
tzdata==2023.3
urllib3==2.0.7
websocket-client==1.6.4
Werkzeug==3.0.1
wrapt==1.14.1
zipp==3.17.0

@peccataaaaa Bug has been assigned

Thanks you @peccataaaaa for pointing out the issue and suggesting a solution. The issue is being resolved.