diff --git a/octobot_tentacles_manager/exporters/artifact_exporter.py b/octobot_tentacles_manager/exporters/artifact_exporter.py index b8e03ff..7479f0f 100644 --- a/octobot_tentacles_manager/exporters/artifact_exporter.py +++ b/octobot_tentacles_manager/exporters/artifact_exporter.py @@ -211,6 +211,8 @@ async def create_metadata_file(self) -> None: """ try: artifact_metadata: models.ArtifactMetadata = await self.get_metadata_instance() + if not os.path.exists(artifact_metadata.artifact.output_dir): + os.makedirs(artifact_metadata.artifact.output_dir) async with aiofiles.open(os.path.join(self.get_metadata_file_path(), constants.ARTIFACT_METADATA_FILE), "w") as metadata_file: await metadata_file.write(yaml.dump(artifact_metadata.to_dict()))