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
I was hesitant at first, because there might be a lot of other packages that also do some kind of path representation. And they probably all can map it to a string (which we already support). But since pathlib is a python core package we can support it.
When changing this, it should also be more verbose in case of any expected input. So maybe use isinstance(something, io.IOBase) for the file like output, and add one for the pathlib, and if none match raise an error.
Bug report
If the
filename
argument is apathlib
object, it is mistakenly recognized as a file handler.I think
open_filename
should accept apathlib
object.pdfminer.six/pdfminer/utils.py
Lines 14 to 25 in 0b44f77
The text was updated successfully, but these errors were encountered: