diff --git a/hub/city_model_structure/building.py b/hub/city_model_structure/building.py
index c21b1621..83f50143 100644
--- a/hub/city_model_structure/building.py
+++ b/hub/city_model_structure/building.py
@@ -10,8 +10,6 @@ import logging
from typing import List, Union, TypeVar
import numpy as np
-import pandas as pd
-
import hub.helpers.constants as cte
from hub.city_model_structure.attributes.polyhedron import Polyhedron
from hub.city_model_structure.building_demand.household import Household
@@ -731,9 +729,10 @@ class Building(CityObject):
for _key in self.roofs[0].global_irradiance.keys():
_results = [0 for _ in range(0, len(self.roofs[0].global_irradiance[_key][cte.SRA]))]
for surface in self.roofs:
- _results = [x + y * _efficiency * surface.perimeter_area
- * surface.solar_collectors_area_reduction_factor * z
- for x, y, z in zip(_results, surface.global_irradiance[_key][cte.SRA],
- orientation_losses_factor[cte.MONTH]['south'])]
+ if _key in orientation_losses_factor:
+ _results = [x + y * _efficiency * surface.perimeter_area
+ * surface.solar_collectors_area_reduction_factor * z
+ for x, y, z in zip(_results, surface.global_irradiance[_key][cte.SRA],
+ orientation_losses_factor[_key]['south'])]
self._onsite_electrical_production[_key] = _results
return self._onsite_electrical_production
diff --git a/hub/data/energy_systems/montreal_custom_systems.xml b/hub/data/energy_systems/montreal_custom_systems.xml
index ed657e5a..be67a4ea 100644
--- a/hub/data/energy_systems/montreal_custom_systems.xml
+++ b/hub/data/energy_systems/montreal_custom_systems.xml
@@ -192,29 +192,29 @@
3
-
- Multi-zone built-up system with baseboard heater hydronic with fuel fired boiler
-
- heating
- domestic_hot_water
-
-
- 2
- 1
- 3
-
+
+ Multi-zone built-up system with baseboard heater hydronic with fuel fired boiler
+
+ heating
+ domestic_hot_water
+
+
+ 2
+ 1
+ 3
+
-
- Multi-zone built-up system with electrical baseboard heater and electrical hot water
-
- heating
- domestic_hot_water
-
-
- 2
- 1
- 3
-
+
+ Multi-zone built-up system with electrical baseboard heater and electrical hot water
+
+ heating
+ domestic_hot_water
+
+
+ 2
+ 1
+ 3
+
Unitary air conditioner air cooled DX with external condenser
diff --git a/tests/test_systems_factory.py b/tests/test_systems_factory.py
index ac322c88..0305c23a 100644
--- a/tests/test_systems_factory.py
+++ b/tests/test_systems_factory.py
@@ -112,3 +112,4 @@ class TestSystemsFactory(TestCase):
self.assertLess(0, building.cooling_consumption[cte.YEAR][0])
self.assertLess(0, building.domestic_hot_water_consumption[cte.YEAR][0])
self.assertLess(0, building.onsite_electrical_production[cte.YEAR][0])
+ print(building.heating_consumption[cte.YEAR][0], building.cooling_consumption[cte.YEAR][0], building.domestic_hot_water_consumption[cte.YEAR][0], building.onsite_electrical_production[cte.YEAR][0])
\ No newline at end of file