Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: '_VirtualList' object is not callable

Tags:

python

pdf

reader

when ever i run this code my GUI show this error:

_VirtualList' object is not callable

where im wrong?

import PyPDF2
pdf = open("the-alchemist-paulo-coelho.pdf", "rb")
reader = PyPDF2.PdfReader(pdf)
page = reader.pages(0)
print(page.extractText())
like image 255
Ali Abdullah Avatar asked Mar 13 '26 08:03

Ali Abdullah


1 Answers

Use page = reader.pages[0] instead of page = reader.pages(0)

like image 73
Chris_hro Avatar answered Mar 14 '26 21:03

Chris_hro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!