ArrcttacsrjksX commited on
Commit
24e1083
·
verified ·
1 Parent(s): bdf0464

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -50,6 +50,10 @@ def convert_image_to_dxf(image_file, output_folder=None, use_lines=False):
50
  if not os.path.exists(output_path):
51
  return "Conversion failed: DXF file was not created.", None, None
52
 
 
 
 
 
53
  # Clean up temporary folder
54
  if output_folder and os.path.isdir(output_folder):
55
  shutil.rmtree(output_folder)
 
50
  if not os.path.exists(output_path):
51
  return "Conversion failed: DXF file was not created.", None, None
52
 
53
+ # Check if the output DXF file exists
54
+ if not os.path.isfile(output_path):
55
+ return f"Error: The DXF file was not found at {output_path}.", None, None
56
+
57
  # Clean up temporary folder
58
  if output_folder and os.path.isdir(output_folder):
59
  shutil.rmtree(output_folder)