class Job:
def __init__(self):
self.path = "path-to-xml-file"
self.job_dict = {}
def load_jobs(self, env, path):
file = read_from_s3(env, full_path) # reads the job file from S3 bucket
dict = xmltodict.parse(file)
for item in dict['items']['item']:
key = item['job_id']
self.job_dict[key] = item # <-- I get exception on this line