diff --git a/visualdl/utils/dir.py b/visualdl/utils/dir.py index ee26498f1845ddda78058d18dccee6448d26f084..4e9ccd63feebbdc8a3b8d353c991dbfafb504b20 100644 --- a/visualdl/utils/dir.py +++ b/visualdl/utils/dir.py @@ -31,7 +31,7 @@ CONFIG_PATH = os.path.join(CONF_HOME, 'config.json') def init_vdl_config(): if not os.path.exists(CONF_HOME): - os.makedirs(CONF_HOME) + os.makedirs(CONF_HOME, exist_ok=True) if not os.path.exists(CONFIG_PATH) or 0 == os.path.getsize(CONFIG_PATH): with open(CONFIG_PATH, 'w') as fp: fp.write(json.dumps(default_vdl_config))