From f13941d148287ed3b3058cd0547500bb26ae0798 Mon Sep 17 00:00:00 2001 From: Guille Date: Sat, 22 Jun 2024 18:01:41 +0200 Subject: [PATCH] Skipt cost errors --- main.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index e710dbd..da40985 100644 --- a/main.py +++ b/main.py @@ -105,14 +105,15 @@ for city in cities: results = values[0][0] try: calculate_building(city_object, results, scenario_ids[city[1]]) + building_data['insel meb'] = results['insel meb'] + building_data['costs'] = results['costs'] + building_data['operational_co2'] = results['operational_co2'] + try: + montreal_retrofit_db[f'meb_{city[1].replace(" ", "_")}'].insert_one(building_data) + except: + pass except KeyError: pass - building_data['insel meb'] = results['insel meb'] - building_data['costs'] = results['costs'] - building_data['operational_co2'] = results['operational_co2'] - try: - montreal_retrofit_db[f'meb_{city[1].replace(" ", "_")}'].insert_one(building_data) - except: - pass + print(f'Completed in: {datetime.datetime.now() - start}')