From 2f95938d706ef93e6afd693b08b400f15b306f6c Mon Sep 17 00:00:00 2001 From: janssenhenning Date: Fri, 28 Jan 2022 09:59:18 +0100 Subject: [PATCH] Correct error message in _encodeFilename --- src/lxml/apihelpers.pxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxml/apihelpers.pxi b/src/lxml/apihelpers.pxi index 1e1df61ad..93110b04e 100644 --- a/src/lxml/apihelpers.pxi +++ b/src/lxml/apihelpers.pxi @@ -1618,7 +1618,7 @@ cdef object _encodeFilename(object filename): pass return filename8 else: - raise TypeError("Argument must be string, unicode or PathLike.") + raise TypeError("Argument must be string or unicode") cdef object _decodeFilename(const_xmlChar* c_path): u"""Make the filename a unicode string if we are in Py3.