diff --git a/pysegcnn/core/logging.py b/pysegcnn/core/logging.py
index edcdbbd58daae0a9346775186d0e2af868584198..916a4f05acdca71710e4d5109042d335cf4ed149 100644
--- a/pysegcnn/core/logging.py
+++ b/pysegcnn/core/logging.py
@@ -42,7 +42,7 @@ def log_conf(logfile):
     # check if the parent directory of the log file exists
     logfile = pathlib.Path(logfile)
     if not logfile.parent.is_dir():
-        logfile.parents.mkdir(parent=True, exist_ok=True)
+        logfile.parent.mkdir(parents=True, exist_ok=True)
 
     LOGGING_CONFIG = {
         'version': 1,