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
Apparently there are cases where PyPDF3 can generate a warning, but there's no filename to be found, which raises IndexError. In my case, this is happening while running coverage, during the collection phase.
File "/usr/lib/python3.8/ast.py", line 47, in parse
return compile(source, filename, mode, flags,
File "/usr/lib/python3.8/warnings.py", line 109, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,
File "/opt/python/lib/python3.8/site-packages/PyPDF3/pdf.py", line 1186, in _showwarning
file.write(formatWarning(message, category, filename, lineno, line))
File "/opt/python/lib/python3.8/site-packages/PyPDF3/utils.py", line 65, in formatWarning
file = filename.replace("/", "\").rsplit("\", 1)[1] # find the file name
IndexError: list index out of range
Python 3.8.10 (Ubuntu 20.04 LTS)
The text was updated successfully, but these errors were encountered:
Apparently there are cases where PyPDF3 can generate a warning, but there's no filename to be found, which raises IndexError. In my case, this is happening while running coverage, during the collection phase.
Python 3.8.10 (Ubuntu 20.04 LTS)
The text was updated successfully, but these errors were encountered: