Ecobee configuration

I loaded the latest Hassbian and all was going well until I attempted to load Ecobee. I had done a manual install prior to this and Ecobee had worked then but I’m getting the following error from the configuration.yaml

Error during setup of component ecobee
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/”, line 145, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/lib/python3.5/asyncio/”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/”, line 304, in _wakeup
File “/usr/lib/python3.5/asyncio/”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/”, line 120, in setup
NETWORK = EcobeeData(hass.config.path(ECOBEE_CONFIG_FILE))
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/”, line 94, in init
self.ecobee = Ecobee(config_file)
File “/srv/homeassistant/lib/python3.5/site-packages/pyecobee/”, line 72, in init
File “/srv/homeassistant/lib/python3.5/site-packages/pyecobee/”, line 88, in request_pin
self.authorization_code = request.json()[‘code’]
KeyError: ‘code’

I’m relatively new to this and mostly lost.
Thanks for any help.