Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Porting CESM2,ERROR:xml.etree.ElementTree.ParseError: unbound prefix

CGL

CGL
Member
I wanna to port the CESM2 to the machine. I revised the config_machine.xml,config_batch.xml and config_compilers.xml.
When i try to create new case, Error was reported.
Traceback (most recent call last): File "./create_newcase", line 243, in <module> _main_func(__doc__) File "./create_newcase", line 238, in _main_func extra_machines_dir=extra_machines_dir) File "/data/sxh/CESM2/CESM/cesm2/cime/scripts/Tools/../../scripts/lib/CIME/case/case.py", line 1644, in create extra_machines_dir=extra_machines_dir) File "/data/sxh/CESM2/CESM/cesm2/cime/scripts/Tools/../../scripts/lib/CIME/case/case.py", line 963, in configure machobj = Machines(machine=machine_name, extra_machines_dir=extra_machines_dir) File "/data/sxh/CESM2/CESM/cesm2/cime/scripts/Tools/../../scripts/lib/CIME/XML/machines.py", line 43, in __init__ GenericXML.__init__(self, infile, schema) File "/data/sxh/CESM2/CESM/cesm2/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 64, in __init__ self.read(infile, schema) File "/data/sxh/CESM2/CESM/cesm2/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 102, in read self.read_fd(fd) File "/data/sxh/CESM2/CESM/cesm2/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 126, in read_fd self.tree = ET.parse(fd) File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1182, in parse tree.parse(source, parser) File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 656, in parse parser.feed(data) File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err xml.etree.ElementTree.ParseError: unbound prefix: line 73, column 4
How can i fix it? I feel maybe python version not match the CESM2. Current python version is 2.7.
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
You will need a newer version of python for CESM2. I'm not sure if that's the error you are getting above, but I do recommend using a newer python version. We use python3.7.9 on cheyenne for example.

The above issue might also indicate a problem in your XML files. I'd suggest using xmllint by hand to see if you have valid XML. You can also use the XSD files under "cime/CIME/data/config/xml_schemas" to see if your XML follows our standards for those specific files.
 

CGL

CGL
Member
Thanks. The problem is XML file have some wrong spell when i revise some function and definite. It's solved.
 
Top