Skip to content

Commit 93dd176

Browse files
fix: reuploading file on CDREAD (#3355)
* fix: reuploading file on CDREAD * chore: adding changelog file 3355.fixed.md --------- Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 99eedcd commit 93dd176

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

doc/changelog.d/3355.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: reuploading file on CDREAD

src/ansys/mapdl/core/mapdl_grpc.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,9 +1764,20 @@ def input(
17641764
fname = tmp_modified_file
17651765

17661766
# Running method
1767-
# always check if file is present as the grpc and MAPDL errors
1768-
# are unclear
1769-
filename = self._get_file_path(fname, progress_bar)
1767+
#
1768+
if "CDRE" in orig_cmd.upper():
1769+
# CDREAD already uploads the file, and since the priority in
1770+
# `_get_file_path` is for the files in the python working directory,
1771+
# we skip that function here.
1772+
self._log.debug(
1773+
f"Avoid uploading the file {fname} because `CDREAD` should have upload it already."
1774+
)
1775+
filename = fname
1776+
1777+
else:
1778+
# Always check if file is present as the grpc and MAPDL errors
1779+
# are unclear
1780+
filename = self._get_file_path(fname, progress_bar)
17701781

17711782
if time_step_stream is not None:
17721783
if time_step_stream <= 0:

0 commit comments

Comments
 (0)