Skip to content

Conversation

@hpohekar
Copy link
Collaborator

@hpohekar hpohekar commented Jul 28, 2023

Implemented suggestions given by @mkundu1 and @raph-luc

>>> from ansys.fluent.core import examples                      
>>> filepath = examples.path("elbow_param.cas.h5")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Repos\pyfluent\src\ansys\fluent\core\examples\downloads.py", line 144, in path
    raise FileNotFoundError(f"{filename} does not exist.")
FileNotFoundError: elbow_param.cas.h5 does not exist.
>>> path = examples.download_file("elbow_param.cas.h5", "pyfluent/mixing_elbow")
Checking if specified file already exists...
File does not exist. Downloading specified file...
Download successful. File path:
C:\Users\hpohekar\AppData\Local\Ansys\ansys_fluent_core\examples\elbow_param.cas.h5
>>> path
'C:\\Users\\hpohekar\\AppData\\Local\\Ansys\\ansys_fluent_core\\examples\\elbow_param.cas.h5'
>>> filepath = examples.path("elbow_param.cas.h5")                               
>>> filepath
'C:\\Users\\hpohekar\\AppData\\Local\\Ansys\\ansys_fluent_core\\examples\\elbow_param.cas.h5'
>>> filepath = examples.path(path)                 
>>> filepath                       
'C:\\Users\\hpohekar\\AppData\\Local\\Ansys\\ansys_fluent_core\\examples\\elbow_param.cas.h5'
>>>       

@hpohekar hpohekar merged commit 49bfa91 into main Jul 28, 2023
@hpohekar hpohekar deleted the fix/example_file_path_update branch July 28, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants