From 7b7f246dab008f3e9c27de6986732262500b8164 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Sat, 8 Oct 2022 07:58:17 +0300 Subject: [PATCH] #Audio - make folder if not exists --- Sources/pyOpenRPA/Robot/Audio.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/pyOpenRPA/Robot/Audio.py b/Sources/pyOpenRPA/Robot/Audio.py index 63a3339a..512e8ddf 100644 --- a/Sources/pyOpenRPA/Robot/Audio.py +++ b/Sources/pyOpenRPA/Robot/Audio.py @@ -286,6 +286,8 @@ class Recorder: ) self.mRecordedFramesList = [] lTimeSecFloat = time.time() + if not os.path.exists(os.path.abspath(self.mFolderPathStr)): + os.mkdir(self.mFolderPathStr) sound.export(lFilePathStr, format=f"{self.mFileFormatStr}") self.mFileNameList.append(lFileNameWExtStr) self.mFileInfoDict[lFileNameWExtStr]= {