ansys / ansys/pyfluent-parametric

Bug located in parametric_static_mixer_1.py

Open
#297 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
29
Forks
6
PR merge metrics
No merged PRs in 30d

Description

### 🔍 Before submitting the issue

- [X] I have searched among the existing issues
- [X] I am using a Python virtual environment

### 🐞 Description of the bug

The script crashes at l.268 during the proj.save_as step

`Studies available [to rename]: ("Static_Mixer_main-1-Solve" "Static_Mixer_main-Solve")
(syncdir "C:\Users\mathieu\Documents\GitHub\NeurEcoTools\Tools\Fluent\example\project-0e0u1g4e.cffdb\Static_Mixer_main-1-Solve\Base DP")Cannot change directory to C:\\Users\\mathieu\\Documents\\GitHub\\NeurEcoTools\\Tools\\Fluent\\example\\project-0e0u1g4e.cffdb\\Static_Mixer_main-1-Solve\\Base DPCannot change directory to C:\Users\mathieu\Documents\GitHub\NeurEcoTools\Tools\Fluent\example\project-0e0u1g4e.cffdb\Static_Mixer_main-1-Solve\Base DP()
Studies available [to delete]: ("Static_Mixer_main-Solve")
C:/Users/mathieu/Documents/GitHub/NeurEcoTools/Tools/Fluent/example/project-0e0u1g4e.cffdb\\Static_Mixer_main-Solve\\BASECA~1\\debug.log - The process cannot access the file because it is being used by another process.
C:/Users/mathieu/Documents/GitHub/NeurEcoTools/Tools/Fluent/example/project-0e0u1g4e.cffdb\\Static_Mixer_main-Solve\\BASECA~1 - The process cannot access the file because it is being used by another process.
Deleted the Simulation : "Static_Mixer_main-Solve"

Current working directory is "C:\Users\mathieu\Documents\GitHub\NeurEcoTools\Tools\Fluent\example\project-0e0u1g4e.cffdb"
Traceback (most recent call last):
File "C:\Users\mathieu\Documents\GitHub\NeurEcoTools\Tools\Fluent\example\parametric_static_mixer_1.py", line 268, in
proj.save_as(project_filepath=project_filepath_save_as)
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\parametric\__init__.py", line 552, in save_as
self._parametric_project.save_as(project_filename=project_filepath)
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\core\solver\flobject.py", line 1581, in __call__
return self.execute_command(**kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\core\solver\flobject.py", line 1542, in execute_command
ret = self._execute_command(*args, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\core\solver\flobject.py", line 1577, in _execute_command
return self.flproxy.execute_cmd(self._parent.path, self.obj_name, **newkwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\core\services\settings.py", line 124, in _fn
return fn(self, *args, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\core\services\settings.py", line 329, in execute_cmd
response = self._service_impl.execute_cmd(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\core\services\settings.py", line 91, in execute_cmd
return self.__stub.ExecuteCommand(request, metadata=self.__metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\grpc\_interceptor.py", line 277, in __call__
response, ignored_call = self._with_call(
^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\grpc\_interceptor.py", line 329, in _with_call
call = self._interceptor.intercept_unary_unary(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\core\services\interceptors.py", line 122, in intercept_unary_unary
return self._intercept_call(continuation, client_call_details, request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mathieu\miniconda3\envs\neurecoFluent\Lib\site-packages\ansys\fluent\core\services\interceptors.py", line 112, in _intercept_call
raise ex from None
RuntimeError: Unable to compile python code:
Error Object: ()`

### 📝 Steps to reproduce

run the python script
https://parametric.fluent.docs.pyansys.com/version/stable/_downloads/44a0d4438f9c187bd0499b66d23d9464/parametric_static_mixer_1.py

### 💻 Which operating system are you using?

Windows

### 📀 Which ANSYS version are you using?

fluent 24.1.0

### 🐍 Which Python version are you using?

3.11

### 📦 Installed packages

```shell
about-time==4.2.1
alive-progress==3.1.5
ansys-api-fluent==0.3.22
ansys-api-platform-instancemanagement==1.0.0
ansys-fluent-core==0.20.0
ansys-fluent-parametric==0.10.0
ansys-platform-instancemanagement==1.1.2
ansys-units==0.3.2
beartype==0.17.2
certifi==2024.2.2
charset-normalizer==3.3.2
docker==6.1.3
grapheme==0.6.0
grpcio==1.62.1
grpcio-health-checking==1.48.2
h5py==3.10.0
idna==3.6
importlib_metadata==7.1.0
lxml==4.9.4
numpy==1.26.4
packaging==24.0
pandas==1.5.3
platformdirs==3.11.0
protobuf==3.20.3
psutil==5.9.8
python-dateutil==2.9.0.post0
pytz==2024.1
pywin32==306
PyYAML==6.0.1
requests==2.31.0
six==1.16.0
urllib3==2.2.1
websocket-client==1.7.0
zipp==3.18.1
```

Contributor guide

Open the contributing guide

Research direction

Start with parametric_static_mixer_1.py and reproduce the failure at line 268 by running the linked script on Windows with the reported Fluent and Python versions. Trace the proj.save_as step and the preceding simulation rename/delete messages; done means the script completes save_as without the reported directory, file-lock, or compilation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.