cyverse/atmosphere

Problem: `KeyError: 'chargeCode'` in `create_reports`

julianpistorius opened this issue · 1 comments

/opt/dev/atmosphere/jetstream/tasks.pyc in create_reports()
     46                                                                                                     allocation_name))
     47             continue
---> 48         project_name = driver.get_allocation_project_name(allocation_name)
     49         try:
     50             project_report = _create_tas_report_for(

/opt/dev/atmosphere/jetstream/allocation.pyc in get_allocation_project_name(self, allocation_name)
    156 
    157     def get_allocation_project_name(self, allocation_name):
--> 158         allocation = self.get_allocation(allocation_name)
    159         if not allocation:
    160             return

/opt/dev/atmosphere/jetstream/allocation.pyc in get_allocation(self, allocation_name)
    174         filtered_list = [
    175             a for a in self.get_all_allocations()
--> 176             if str(a['chargeCode']) == str(allocation_name)]
    177         if len(filtered_list) > 1:
    178             logger.error(">1 value found for allocation %s" % allocation_name)

KeyError: 'chargeCode'