You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maximum recursion depth exceeded error when using pdfminer3k
Here is my code:
def readPDF(path):
rsrcmgr = PDFResourceManager()
retstr = StringIO()
laparams = LAParams()
device = TextConverter(rsrcmgr, retstr, laparams=laparams)
with io_open(path, 'rb') as pdfFile:
process_pdf(rsrcmgr, device, pdfFile)
device.close()
content = retstr.getvalue()
retstr.close()
filename = path.replace('pdf', 'txt')
with open(filename, 'w') as f:
f.write(content)
This is the error received:
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/usr/local/python3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/usr/local/python3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/usr/local/python3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
File "/usr/local/python3/lib/python3.6/site-packages/pdfminer/pdftypes.py", line 132, in repr
return '<PDFStream(%r): raw=%d, %r>' % (self.objid, len(self.rawdata), self.attrs)
RecursionError: maximum recursion depth exceeded while calling a Python object
Call stack:
File "run_history.py", line 11, in
cmdline.execute("scrapy crawl sse_listedinfo_announcement -a begin_date={0} -a end_date={1} -a path={2}".format(begin_date, end_date, path).split())
File "/usr/local/python3/lib/python3.6/site-packages/scrapy/cmdline.py", line 142, in execute
_run_print_help(parser, _run_command, cmd, args, opts)
File "/usr/local/python3/lib/python3.6/site-packages/scrapy/cmdline.py", line 88, in _run_print_help
Fatal Python error: Cannot recover from stack overflow:
The text was updated successfully, but these errors were encountered:
maximum recursion depth exceeded error when using pdfminer3k
Here is my code:
def readPDF(path):
This is the error received:
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/usr/local/python3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/usr/local/python3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/usr/local/python3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
File "/usr/local/python3/lib/python3.6/site-packages/pdfminer/pdftypes.py", line 132, in repr
return '<PDFStream(%r): raw=%d, %r>' % (self.objid, len(self.rawdata), self.attrs)
RecursionError: maximum recursion depth exceeded while calling a Python object
Call stack:
File "run_history.py", line 11, in
cmdline.execute("scrapy crawl sse_listedinfo_announcement -a begin_date={0} -a end_date={1} -a path={2}".format(begin_date, end_date, path).split())
File "/usr/local/python3/lib/python3.6/site-packages/scrapy/cmdline.py", line 142, in execute
_run_print_help(parser, _run_command, cmd, args, opts)
File "/usr/local/python3/lib/python3.6/site-packages/scrapy/cmdline.py", line 88, in _run_print_help
Fatal Python error: Cannot recover from stack overflow:
The text was updated successfully, but these errors were encountered: