+ 3

What is the error in this code??

from tkinter import * from PIL import Image,ImageTk from pdf2image import convert_from_path root = Tk() pdf_frame = Frame(root).pack(fill=BOTH,expand=1) scrol_y = Scrollbar(pdf_frame,orient=VERTICAL) pdf = Text(pdf_frame,yscrollcommand=scrol_y.set,bg="grey") scrol_y.pack(side=RIGHT,fill=Y) scrol_y.config(command=pdf.yview) pdf.pack(fill=BOTH,expand=1) pages = convert_from_path(r'/storage/emulated/0/Android/data/ru.iiec.pydroid3/files/rdpd.pdf',size=(800,900)) photos = [] for i in range(len(pages)): photos.append(ImageTk.PhotoImage(pages[i])) for photo in photos: pdf.image_create(END,image=photo) pdf.insert(END,'\n\n') mainloop()

18th Feb 2021, 4:11 AM
Ujjawal Gupta
Ujjawal Gupta - avatar
4 Answers
+ 1
Please add-show your attempt in a code playground so the community can help you more easily :)
18th Feb 2021, 7:48 AM
Matthew
Matthew - avatar
+ 2
Just see the error in code
18th Feb 2021, 6:51 AM
Carbon dioxide
Carbon dioxide - avatar
+ 2
Ujjawal Gupta the error of the code : ImportError
20th Feb 2021, 1:32 PM
Carbon dioxide
Carbon dioxide - avatar
0
No bro I run this code on pydroid3
20th Feb 2021, 3:34 PM
Ujjawal Gupta
Ujjawal Gupta - avatar