Skip to content

NameError after switching to solution mode #1522

@millerj97

Description

@millerj97

🔍 Before submitting the issue

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

🐞 Description of the bug

Using "Switch to Solution Mode" button with GUI enabled, or using command meshing.switch_to_solver(), the following error is raised when trying to enter solver commands.

Traceback (most recent call last):
File "", line 1, in
NameError: name 'solver' is not defined

📝 Steps to reproduce

  1. launch PyFluent meshing mode, with GUI and py set to True

  2. use GUI button switch to solution mode or run command meshing.switch_to_solver()

  3. run a command in the GUI console such as; solver.solution.initialization.defaults.get_object_names()

  4. note output in console and command line window

  5. run same command from command line window

  6. error raised;

     Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     NameError: name 'solver' is not defined
    
  7. repeat the above steps 3-5 launching directly in solution mode, confirm that the command runs in both windows

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

v232

🐍 Which Python version are you using?

3.7

📦 Installed packages

ansys-api-fluent==0.3.11
ansys-api-platform-instancemanagement==1.0.0b3
-e git+https://github.com/pyansys/pyfluent.git@01a80f1933b2eac208ab371a27bc019ec7a953bb#egg=ansys_fluent_core                     ansys-platform-instancemanagement==1.0.3
appdirs==1.4.4
googleapis-common-protos==1.59.0
grpcio==1.53.0
h5py==3.8.0
importlib-metadata==6.1.0                                                                                                                                                                     lxml==4.9.2
numpy==1.21.6
pandas==1.3.5
protobuf==3.20.3
protoc-gen-swagger==0.1.0
python-dateutil==2.8.2
pytz==2023.3
PyYAML==6.0
six==1.16.0
typing_extensions==4.5.0
zipp==3.15.0

Metadata

Metadata

Assignees

Labels

bugIssue, problem or error in PyFluent

Type

No type

Projects

Status

2021-2024

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions