Skip to content

Commit

Permalink
fix: reuploading file on CDREAD (#3355)
Browse files Browse the repository at this point in the history
* fix: reuploading file on CDREAD

* chore: adding changelog file 3355.fixed.md

---------

Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
germa89 and pyansys-ci-bot authored Aug 20, 2024
1 parent 99eedcd commit 93dd176
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/changelog.d/3355.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: reuploading file on CDREAD
17 changes: 14 additions & 3 deletions src/ansys/mapdl/core/mapdl_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1764,9 +1764,20 @@ def input(
fname = tmp_modified_file

# Running method
# always check if file is present as the grpc and MAPDL errors
# are unclear
filename = self._get_file_path(fname, progress_bar)
#
if "CDRE" in orig_cmd.upper():
# CDREAD already uploads the file, and since the priority in
# `_get_file_path` is for the files in the python working directory,
# we skip that function here.
self._log.debug(
f"Avoid uploading the file {fname} because `CDREAD` should have upload it already."
)
filename = fname

else:
# Always check if file is present as the grpc and MAPDL errors
# are unclear
filename = self._get_file_path(fname, progress_bar)

if time_step_stream is not None:
if time_step_stream <= 0:
Expand Down

0 comments on commit 93dd176

Please sign in to comment.