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
Hello,
tests (and the library) is failing when running on the python3 (3.11.6) and the defusedxml (0.7.1) is present (as this is the preffered xml library by the xlrd2). In defusedxml there is some strange situation where Element_has_iter is evaluated as false, but at the same time there is no getiterator() function.
self = <xlrd2.xlsx.X12Book object at 0x7f676b8b09d0>
stream = <zipfile.ZipExtFile name='xl\\workbook.xml' mode='r' compress_type=deflate>
heading = 'Workbook'
def process_stream(self, stream, heading=None):
if self.verbosity >= 2 and heading is not None:
fprintf(self.logfile, "\n=== %s ===\n", heading)
self.tree = ET.parse(stream)
getmethod = self.tag2meth.get
> for elem in self.tree.iter() if Element_has_iter else self.tree.getiterator():
E AttributeError: 'ElementTree' object has no attribute 'getiterator'
xlrd2/xlsx.py:266: AttributeError
Hello,
tests (and the library) is failing when running on the python3 (3.11.6) and the defusedxml (0.7.1) is present (as this is the preffered xml library by the xlrd2). In defusedxml there is some strange situation where Element_has_iter is evaluated as false, but at the same time there is no getiterator() function.
Full log from pytest:
error.txt
Workaround:
use xml.etree.cElementTree as default rather than defusedxml.ElementTree in xlrd2/xlsx.py
The text was updated successfully, but these errors were encountered: