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
Traceback (most recent call last):
File "C:\Users\Thomas Huet\AppData\Local\Programs\Python\Python311\Lib\xml\sax\expatreader.py", line 217, in feed
self._parser.Parse(data, isFinal)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 5201, column 98
Here it is the &, a special character that's creates the error
And ChatGPT has spotted a potential issue in EAMENA.xml, line 11528, a misread of the < character
...
File src/lxml/parser.pxi:1881 in lxml.etree._parseDocFromFile
File src/lxml/parser.pxi:1200 in lxml.etree._BaseParser._parseDocFromFile
File src/lxml/parser.pxi:633 in lxml.etree._ParserContext._handleParseResultDoc
File src/lxml/parser.pxi:743 in lxml.etree._handleParseResult
File src/lxml/parser.pxi:672 in lxml.etree._raiseParseError
File /mnt/data/EAMENA.xml:11528
<10km)"}
^
XMLSyntaxError: StartTag: invalid element name, line 11528, column 7
This could be the reason why I struggle creating and importing (translated) Concepts in the training instance, fro example: EAMENA_fr.xml
The Python code (thks to Chat) to validate the XML is:
defparse_xml( url='https://raw.githubusercontent.com/eamena-project/eamena-arches-dev/main/dbs/database.eamena/data/reference_data/concepts/EAMENA.xml'):
# check if the XML structure is OK (no syntax errors)importrequestsfromlxmlimportetreetry:
# url = 'https://raw.githubusercontent.com/eamena-project/eamena/master/eamena/pkg/reference_data/concepts/EAMENA.xml'response=requests.get(url)
root=etree.fromstring(response.content)
# Attempt to extract basic information again to confirm successful parsingroot_info_new_upload= {'root_tag': root.tag, 'children_tags': [child.tagforchildinroot]}
parsing_message="XML parsed successfully."exceptetree.XMLSyntaxErrorase:
root_info_new_upload=Noneparsing_message=f"Error parsing XML: {str(e)}"print(root_info_new_upload, parsing_message)
The text was updated successfully, but these errors were encountered:
Errors when running
excel2skos.py
Here it is the
&
, a special character that's creates the errorAnd ChatGPT has spotted a potential issue in EAMENA.xml, line 11528, a misread of the
<
characterThis could be the reason why I struggle creating and importing (translated) Concepts in the training instance, fro example: EAMENA_fr.xml
The Python code (thks to Chat) to validate the XML is:
The text was updated successfully, but these errors were encountered: