diff --git a/doc/changelog.d/3355.fixed.md b/doc/changelog.d/3355.fixed.md new file mode 100644 index 0000000000..cda6a43a41 --- /dev/null +++ b/doc/changelog.d/3355.fixed.md @@ -0,0 +1 @@ +fix: reuploading file on CDREAD \ No newline at end of file diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index f804ea04dc..c713a5c421 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -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: