maxpmaxp / pdfreader

Python API for PDF documents
MIT License
113 stars 26 forks source link

RecursionError: maximum recursion depth exceeded while calling a Python object #107

Open Tachyon5 opened 1 year ago

Tachyon5 commented 1 year ago

Hi, I am trying to work through the example in the tutorial here: https://pdfreader.readthedocs.io/en/latest/tutorial.html

upon calling the next(pages) iterator I get the following:

File "/Users/franktaylor/.virtualenvs/old_env/lib/python3.8/site-packages/IPython/lib/pretty.py", line 385, in pretty return self.type_pprinters[cls](obj, self, cycle) File "/Users/franktaylor/.virtualenvs/old_env/lib/python3.8/site-packages/IPython/lib/pretty.py", line 620, in inner p.pretty(obj[key]) File "/Users/franktaylor/.virtualenvs/old_env/lib/python3.8/site-packages/pdfreader/types/objects.py", line 90, in __getitem__ obj = self.doc.build(obj, lazy=True) File "/Users/franktaylor/.virtualenvs/old_env/lib/python3.8/site-packages/pdfreader/document.py", line 76, in build logging.debug("Buliding {}".format(obj)) File "/Users/franktaylor/.virtualenvs/old_env/lib/python3.8/site-packages/pdfreader/types/native.py", line 143, in __repr__ return "<IndirectReference:n={self.num},g={self.gen}>".format(self=self) RecursionError: maximum recursion depth exceeded while calling a Python object

I am using the same pdf in the tutorial. running 0.1.12 on python 3.8 with following dependencies. bitarray==2.7.5 pycryptodome==3.18.0 pycryptodomex==3.18.0 python-dateutil==2.8.2 any help appreciated.

maxpmaxp commented 4 months ago

@Tachyon5 can you provide me with an example file plase?