我正在使用JPanel
。但是我收到以下错误:
xml.etree.ElementTree
我遇到了这篇文章Using SimpleXMLTreeBuilder in elementtree @thom_nic,并按照我的建议:
No module named expat; use SimpleXMLTreeBuilder instead
但是在运行import xml.etree.ElementTree as ET
from elementtree import SimpleXMLTreeBuilder
ET.XMLTreeBuilder = SimpleXMLTreeBuilder.TreeBuilder
时,会出现相同的错误。我不确定我做错了什么。如果我输入tree = ET.parse(ann_dir)
,我会收到print(ET.XMLTreeBuilder)