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/setup.py”, line 145, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/ecobee.py”, line 120, in setup
NETWORK = EcobeeData(hass.config.path(ECOBEE_CONFIG_FILE))
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/ecobee.py”, line 94, in init
self.ecobee = Ecobee(config_file)
File “/srv/homeassistant/lib/python3.5/site-packages/pyecobee/init.py”, line 72, in init
self.request_pin()
File “/srv/homeassistant/lib/python3.5/site-packages/pyecobee/init.py”, 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.
Chris