cold-train-21872
09/22/2023, 1:24 AM@task
def parse_metadata_xml(file_path: Path) -> Tuple:
# Parse the XML file
tree = ET.parse(file_path)
root = tree.getroot()
# Access elements and attributes
result = []
for child in root:
for subchild in child:
key = subchild.tag
val = subchild.text
result.append((key, val))
return tuple(result)
getting this error:
❯ pyflyte run flyteingest/workflows/test.py parse_metadata_xml --file_path 'data/XML/GIF/32d069a26aa4859.xml'
Failed with Unknown Exception <class 'AttributeError'> Reason: __args__