ansys/pyfluent

Unable to read flprj

tejalprabhu01 opened this issue ยท 1 comments

๐Ÿ” Before submitting the issue

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

๐Ÿž Description of the bug

Getting following error while reading the attached flprj using CaseReader :

2d_heat_exchanger_optimizer2.zip

Traceback (most recent call last):
  File "D:\ansysdev/sandbox2/protos/optiSLang/scripting/integrations\Fluent\pyfluent_wrapper.py", line 345, in __init__
    self.reader = CaseFile(project_file_name=self.input_filepath)
  File "C:\Program Files\ANSYS Inc\v251\optiSLang\lib\python3.10\lib\site-packages\ansys\fluent\core\filereader\case_file.py", line 567, in __init__
    project_dir + _get_case_file_name_from_flprj(project_file_name)
  File "C:\Program Files\ANSYS Inc\v251\optiSLang\lib\python3.10\lib\site-packages\ansys\fluent\core\filereader\case_file.py", line 642, in _get_case_file_name_from_flprj
    if len(root.find(folder_name)) > 0
TypeError: object of type 'NoneType' has no len()
 (from RPC dispatch side)

This flprj is created using case files from Fluent tutorials
@seanpearsonuk @mkundu1

๐Ÿ“ Steps to reproduce

from ansys.fluent.core.filereader.case_file import CaseFile
reader = CaseFile(project_file_name=path_to_flprj)

๐Ÿ’ป Which operating system are you using?

Windows

๐Ÿ“€ Which ANSYS version are you using?

2025R1

๐Ÿ Which Python version are you using?

3.10

๐Ÿ“ฆ Installed packages

ansys-fluent-core v0.21.0

@prmukherj Perhaps you can look into this after your current work queue is cleared.