You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest to change the logic in main.py:
if nor os.path.exists(output_directory):
os.makedirs(output_directory)
to:
if os.path.exists(output_directory):
print(output_directory+" exists, will be removed and recreated")
try:
shutil.rmtree(output_directory)
except OSError as e:
print("Output directory already exists, but cannot be removed")
print("Error : %s - %s." % (e.filename, e.strerror))
os.makedirs(output_directory)
This ensures a clean directory at the start, if we keep the "old" without cleaning, there might be intereference with old files (eg the KKMCee-default links etc which could lead to behaviour hard to debug.
The text was updated successfully, but these errors were encountered:
it's the "process" directory that could be clean, so it should be the second part:
if os.path.exists(generator_directory):
print(generator_directory+" exists, will be removed and recreated")
try:
shutil.rmtree(generator_directory)
except OSError as e:
print("Output directory already exists, but cannot be removed")
print("Error : %s - %s." % (e.filename, e.strerror))
os.makedirs(generator_directory)
Hi @apricePhy,
I would like to suggest to change the logic in main.py:
if nor os.path.exists(output_directory):
os.makedirs(output_directory)
to:
if os.path.exists(output_directory):
print(output_directory+" exists, will be removed and recreated")
try:
shutil.rmtree(output_directory)
except OSError as e:
print("Output directory already exists, but cannot be removed")
print("Error : %s - %s." % (e.filename, e.strerror))
os.makedirs(output_directory)
This ensures a clean directory at the start, if we keep the "old" without cleaning, there might be intereference with old files (eg the KKMCee-default links etc which could lead to behaviour hard to debug.
The text was updated successfully, but these errors were encountered: