I have problem with convert using pdf2image module. I don't know where is something wrong with the code. When I run program and paste path the error shows.
Code below:
import os
from pdf2image import convert_from_path
from tkinter import *
from tkinter import messagebox
def convert():
try:
for img in images:
for idx, img in enumerate(images, start=1):
img.save(os.path.join(os.cudir,'new_folder',f"image_{idx}.jpg"))
except:
Result = "FileNotFoundError"
messagebox.showinfo("Result", Result)
else:
Result = "success"
messagebox.showinfo("Result", Result)
master = Tk()
Label(master, text="File Location").grid(row=0, sticky=W)
e1 = Entry(master)
e1.grid(row=0, column=1)
b = Button(master, text="Convert", command=convert)
b.grid(row=0, column=2,columnspan=2, rowspan=2,padx=5, pady=5)
mainloop()