AMS parser failing

Hello all. I have this AMS simulation from a colleague, but uploading it fails with:

"root":{
"errors":string"parser failed with exception"
"event":string"process failed"
"proc":string"Entry"
"process":string"process_entry"
"process_worker_id":string"nVXkqvaNQvKSb5gv8al9aQ"
"parser":string"electronicparsers:ams_parser_entry_point"
"error":string"'NoneType' object has no attribute 'split'"
"step":string"electronicparsers:ams_parser_entry_point"
"logger":string"nomad.processing"
"exception":string"Traceback (most recent call last): File "/opt/venv/lib/python3.11/site-packages/nomad/processing/data.py", line 1507, in parsing parser.parse( File "/opt/venv/lib/python3.11/site-packages/nomad/parsing/parser.py", line 454, in parse self.mainfile_parser.parse(mainfile, archive, logger) File "/opt/venv/lib/python3.11/site-packages/electronicparsers/ams/parser.py", line 1849, in parse self.parse_configurations() File "/opt/venv/lib/python3.11/site-packages/electronicparsers/ams/parser.py", line 1816, in parse_configurations sec_method = parse_method(sp) ^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.11/site-packages/electronicparsers/ams/parser.py", line 1720, in parse_method functionals = dft_potential.get(xc_type, '').split() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split'"
"timestamp":string"2024-12-10 20:47.27"
"level":string"ERROR"
}
Traceback (most recent call last):
  File "/opt/venv/lib/python3.11/site-packages/nomad/processing/data.py", line 1507, in parsing
    parser.parse(
  File "/opt/venv/lib/python3.11/site-packages/nomad/parsing/parser.py", line 454, in parse
    self.mainfile_parser.parse(mainfile, archive, logger)
  File "/opt/venv/lib/python3.11/site-packages/electronicparsers/ams/parser.py", line 1849, in parse
    self.parse_configurations()
  File "/opt/venv/lib/python3.11/site-packages/electronicparsers/ams/parser.py", line 1816, in parse_configurations
    sec_method = parse_method(sp)
                 ^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/electronicparsers/ams/parser.py", line 1720, in parse_method
    functionals = dft_potential.get(xc_type, '').split()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

Could you fix the parser, or is there something wrong with the simulation files? Files are here:
https://www.dropbox.com/scl/fi/n7xzhgznmaen1azsqkvyh/ADC.zip?rlkey=y7f74x7ckxg0t9qtd70ww9kes&st=zbofssyz&dl=0

Thanks in advance.
Best
Fabian

Hi @fabian_li!

This looks like a bug in the AMS parser. Thanks for sharing the problematic file, this will help with tracking down the issue.

@ladinesa: Could you assign someone to take a look at this, or create a fix?

I provided a fix but it could take sometime before this gets picked up.