KeyError
Python 3.10.12: /usr/bin/python3
Sun Jun 2 19:32:31 2024

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /data/www/public_html/submission_system/metadata_upload.py in <module>
     48 
     49     mdp   = ymd.metadata(tempdir+"/"+mdfilename, silent=False)
=>   50     data  = mdp.parse()
     51     check = mdp.check()
     52    
data undefined, mdp = <yamlMetadata.metadata.metadata object>, mdp.parse = <bound method metadata.parse of <yamlMetadata.metadata.metadata object>>
 /var/www/.local/lib/python3.10/site-packages/yamlMetadata/metadata.py in parse(self=<yamlMetadata.metadata.metadata object>)
     63         #print(self.metadata)
     64         for entry in self.metadata:
=>   65             if "author" in entry['type'].lower():
     66                 self.authors.append(entry)
     67             elif "method" in entry['type'].lower():
entry = {'handlers': [{'name': 'restart apache', 'service': {'name': 'httpd', 'state': 'restarted'}}], 'hosts': 'webservers', 'remote_user': 'root', 'tasks': [{'name': 'ensure apache is at the latest version', 'yum': {'name': 'httpd', 'state': 'latest'}}, {'name': 'write the apache config file', 'notify': ['restart apache'], 'template': {'dest': '/etc/httpd.conf', 'src': '/srv/httpd.j2'}}, {'name': 'ensure apache is running', 'service': {'name': 'httpd', 'state': 'started'}}], 'vars': {'http_port': 80, 'max_clients': 200}}, ].lower undefined

KeyError: 'type'
      args = ('type',)
      with_traceback = <built-in method with_traceback of KeyError object>