diff --git a/files/modify_csv.py b/files/modify_csv.py index 205da99..fd8dd9b 100755 --- a/files/modify_csv.py +++ b/files/modify_csv.py @@ -20,6 +20,8 @@ default_csv = str("ausgaben_month/" + check_csv_file_create_new()) def create_csv_file(csv_path=default_csv): if not os.path.exists(csv_path): + directory_csv = os.path.dirname(default_csv) + os.makedirs(directory_csv, exist_ok=True) print(csv_path, "wird angelegt !!") to_write_header = ["datum", "ausgaben", "beschreibung"] with open(csv_path, "w") as wfile: