Traceback (most recent call last):


 "/home/admin/Documents/02-Recherche/02-Python/lms2/lms2/template/bug_Integrals_blocks.py", line 20, in <module>

m.block.int_cost = Integral(m.time, wrt=m.time, rule=_instant_obj)


 "/home/admin/Documents/02-Recherche/02-Python/lms2/venv/lib/python3.6/site-packages/pyomo/core/base/block.py", line 540, in __setattr__

self.add_component(name, val)


 "/home/admin/Documents/02-Recherche/02-Python/lms2/venv/lib/python3.6/site-packages/pyomo/core/base/block.py", line 980, in add_component

val.construct(data)


 "/home/admin/Documents/02-Recherche/02-Python/lms2/venv/lib/python3.6/site-packages/pyomo/core/base/expression.py", line 410, in construct

self.add(None, _init_rule(self._parent()))


 "/home/admin/Documents/02-Recherche/02-Python/lms2/venv/lib/python3.6/site-packages/pyomo/dae/integral.py", line 135, in _trap_rule

ds = sorted(m.find_component(wrt.local_name))
TypeError: 'NoneType' object is not iterable

Traceback (most recent call last):


 "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run

result = self.fn(*self.args, **self.kwargs)


 "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 255, in start

self.add_bridge_accessory(state)


 "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 238, in add_bridge_accessory

acc = get_accessory(self.hass, self.driver, state, aid, conf)


 "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 187, in get_accessory

return TYPES[a_type](hass, driver, name, state.entity_id, aid, config)


 "/usr/src/homeassistant/homeassistant/components/homekit/type_fans.py", line 50, in __init__

self.speed_mapping = HomeKitSpeedMapping(speed_list)


 "/usr/src/homeassistant/homeassistant/components/homekit/util.py", line 135, in __init__

if speed_list[0] != fan.SPEED_OFF:
TypeError: 'NoneType' object is not subscriptable
