ansys / pyfluent

Pythonic interface to Ansys Fluent
https://fluent.docs.pyansys.com
MIT License
278 stars 41 forks source link

topy translation launch string causes ui_mode error #3244

Closed millerj97 closed 2 months ago

millerj97 commented 2 months ago

🔍 Before submitting the issue

🐞 Description of the bug

when translating a journal with -topy, and using a gui flag such as -gu or -gr the launch command translates to: flglobals = pyfluent.setup_for_fluent(product_version="25.1.0", mode="solver", dimension=2, precision="double", processor_count=2, ui_mode="no_gui", graphics_driver="auto")

running the resulting script gives this error for ui_mode:

Traceback (most recent call last):
  File "/tmp/flute_jomiller/tutorials/gascomb_tui_a4.XoXISg/gascomb_tui_a4.py", line 6, in <module>
    flglobals = pyfluent.setup_for_fluent(product_version="25.1.0", mode="solver", dimension=2, precision="double", processor_count=2, ui_mode="no_gui", graphics_driver="auto")
  File "/home/staff/jomiller/pyfluent_venv_files/pyfluent/src/ansys/fluent/core/utils/setup_for_fluent.py", line 9, in setup_for_fluent
    session = launch_fluent(*args, **kwargs)
  File "/home/staff/jomiller/pyfluent_venv_files/pyfluent/src/ansys/fluent/core/utils/deprecate.py", line 49, in wrapper
    return func(*args, **kwargs)
  File "/home/staff/jomiller/pyfluent_venv_files/pyfluent/src/ansys/fluent/core/utils/deprecate.py", line 49, in wrapper
    return func(*args, **kwargs)
  File "/home/staff/jomiller/pyfluent_venv_files/pyfluent/src/ansys/fluent/core/launcher/launcher.py", line 292, in launch_fluent
    launcher = launcher_type(**launcher_argvals)
  File "/home/staff/jomiller/pyfluent_venv_files/pyfluent/src/ansys/fluent/core/launcher/standalone_launcher.py", line 184, in __init__
    self.argvals["ui_mode"] = UIMode(ui_mode)
  File "/home/staff/jomiller/Documents/ansys_inc/certified/v251/commonfiles/CPython/3_10/linx64/Release/python/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/home/staff/jomiller/Documents/ansys_inc/certified/v251/commonfiles/CPython/3_10/linx64/Release/python/lib/python3.10/enum.py", line 718, in __new__
    raise exc
  File "/home/staff/jomiller/Documents/ansys_inc/certified/v251/commonfiles/CPython/3_10/linx64/Release/python/lib/python3.10/enum.py", line 700, in __new__
    result = cls._missing_(value)
  File "/home/staff/jomiller/pyfluent_venv_files/pyfluent/src/ansys/fluent/core/launcher/pyfluent_enums.py", line 55, in _missing_
    raise DisallowedValuesError(
ansys.fluent.core.exceptions.DisallowedValuesError: 'The specified value: 'no_gui' is not a supported value of UIMode. The supported values are: 'no-gui-or-graphics', 'no-graphics', 'no-gui', 'hidden-gui', 'gui'.' has no attribute 'None'.

when running in pyconsole there are no issues

📝 Steps to reproduce

  1. launch fluent 2ddp -t4 -topy -i command_journal.jou -gu command_journal.zip
  2. see resulting py file successfully created
  3. run file in python
  4. see error for gui mode

💻 Which operating system are you using?

Linux

📀 Which ANSYS version are you using?

v251

🐍 Which Python version are you using?

3.10

📦 Installed packages

2to3==1.0
about-time==4.2.1
absl-py==2.1.0
alive-progress==3.1.5
ansys-api-fluent==0.3.27
ansys-api-platform-instancemanagement==1.1.0
ansys-api-tools-filetransfer==0.1.0
-e git+https://github.com/pyansys/pyfluent.git@492edb7b51decc5a9bb5ce47be2b0dfdac1b9ab9#egg=ansys_fluent_core
-e git+https://github.com/ansys/pyfluent-visualization.git@c61ca465646df1bb693afce2be392795b9d7aad8#egg=ansys_fluent_visualization
ansys-hpcservices-file-management-v1==23.1.2407.30
ansys-hpcservices-file-transfer-v1==23.1.2407.30
ansys-hpcservices-global-permission-v1==23.1.2407.30
ansys-hpcservices-hardware-configuration-clusters-v1==23.1.2407.30
ansys-hpcservices-hardware-configuration-endpoints-v1==23.1.2407.30
ansys-hpcservices-hardware-configuration-queues-v1==23.1.2407.30
ansys-hpcservices-hardware-configuration-storages-v1==23.1.2407.30
ansys-hpcservices-job-management-jobs-v1==23.1.2407.30
ansys-hpcservices-job-management-logs-v1==23.1.2407.30
ansys-hpcservices-job-management-templates-v1==23.1.2407.30
ansys-hpcservices-service-management-v1==23.1.2407.30
ansys-hpcservices-user-management-v1==23.1.2407.30
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc0
ansys-tools-filetransfer==0.1.0
ansys-units==0.3.2
asttokens==2.4.1
astunparse==1.6.3
attrs==23.2.0
bcrypt==4.2.0
beartype==0.18.5
black==24.8.0
blinker==1.8.2
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
clr-loader==0.2.6
contourpy==1.3.0
cryptography==43.0.0
cycler==0.12.1
dash==2.17.1
dash-bootstrap-components==1.6.0
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
decorator==5.1.1
distro==1.9.0
docker==7.1.0
et-xmlfile==1.1.0
exceptiongroup==1.2.1
execnet==2.1.1
executing==2.0.1
Flask==3.0.3
flatbuffers==24.3.25
fonttools==4.53.1
future==0.18.0
gast==0.6.0
google-pasta==0.2.0
googleapis-common-protos==1.52.0
grapheme==0.6.0
grpcio==1.66.1
grpcio-health-checking==1.48.1
grpcio-status==1.26.0
h5py==3.11.0
idna==3.7
imageio==2.35.1
importlib_metadata==8.0.0
iniconfig==2.0.0
ipython==8.26.0
itsdangerous==2.2.0
jedi==0.19.1
Jinja2==3.1.4
joblib==1.4.2
kaleido==0.2.1
keras==3.5.0
kiwisolver==1.4.5
libclang==18.1.1
llvmlite==0.39.1
lxml==4.9.4
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.8.0
matplotlib-inline==0.1.7
mdurl==0.1.2
ml-dtypes==0.4.0
mypy-extensions==1.0.0
namex==0.0.8
nest-asyncio==1.6.0
nltk==3.9.1
numba==0.56.4
numpy==1.23.5
nvidia-nccl-cu12==2.22.3
openpyxl==3.1.5
opt-einsum==3.3.0
optree==0.12.1
packaging==24.1
pandas==2.0.3
paramiko==3.4.1
paramiko-expect==0.3.5
parso==0.8.4
pathspec==0.12.1
pexpect==4.9.0
pillow==10.4.0
platformdirs==3.11.0
plotly==5.23.0
pluggy==1.5.0
pooch==1.8.2
prompt_toolkit==3.0.47
protobuf==4.25.3
psutil==6.0.0
ptyprocess==0.7.0
pure_eval==0.2.3
py==1.11.0
pybind11==2.10.0
pycparser==2.22
Pygments==2.18.0
PyNaCl==1.5.0
pyparsing==3.1.2
pytest==7.2.1
pytest-forked==1.6.0
pytest-xdist==1.31.0
python-certifi-win32==1.6.1
python-dateutil==2.9.0.post0
python-pptx==1.0.2
pytz==2024.1
pyvista==0.44.1
pyvistaqt==0.11.1
PyYAML==6.0.2rc1
QtPy==2.4.1
regex==2024.5.15
requests==2.32.3
retrying==1.3.4
rich==13.8.0
scikit-learn==1.5.1
scipy==1.9.3
SCons==4.3.0
scooby==0.10.0
seaborn==0.13.2
setuptools-scm==8.1.0
shapely==2.0.2
sip==6.5.1
six==1.16.0
stack-data==0.6.3
tenacity==9.0.0
tensorboard==2.17.1
tensorboard-data-server==0.7.2
tensorflow==2.17.0
tensorflow-io-gcs-filesystem==0.37.1
termcolor==2.4.0
threadpoolctl==3.5.0
toml==0.10.2
tomli==2.0.1
tqdm==4.66.4
traitlets==5.14.3
typing_extensions==4.12.2
tzdata==2024.1
urllib3==1.26.10
vtk==9.3.20230807rc0
wcwidth==0.2.13
websocket-client==1.8.0
Werkzeug==3.0.4
wrapt==1.16.0
wxPython==4.1.1
xgboost==2.1.1
XlsxWriter==3.2.0
zipp==3.19.2
hpohekar commented 2 months ago

As discussed with @prmukherj assigning to @prmukherj.