I am using an error reporting approach similar to [Example #1 on this page](https://www.programcreek.com/python/example/78618/lxml.etree.DocumentInvalid): ``` except etree.DocumentInvalid as exc: for error in exc.error_log: logger.error(f"{error.filename}:{error.line}: {error.message}") ``` However, this gives: ``` error: "_ErrorLog" has no attribute "__iter__" (not iterable) [attr-defined] ```