diff --git a/src/ansys/fluent/core/session.py b/src/ansys/fluent/core/session.py index f4d82b606e5..7bc3c1a4388 100644 --- a/src/ansys/fluent/core/session.py +++ b/src/ansys/fluent/core/session.py @@ -281,7 +281,8 @@ def upload(self, file_name: str): file_name : str Name of the local file to upload to the server. """ - return self._file_transfer_service.upload_file(file_name) + if self._file_transfer_service: + return self._file_transfer_service.upload_file(file_name) def download(self, file_name: str, local_directory: Optional[str] = "."): """Download a file from the server. @@ -293,7 +294,8 @@ def download(self, file_name: str, local_directory: Optional[str] = "."): local_directory : str, optional Local destination directory. The default is the current working directory. """ - return self._file_transfer_service.download_file(file_name, local_directory) + if self._file_transfer_service: + return self._file_transfer_service.download_file(file_name, local_directory) def __enter__(self): return self