|
发表于 2018-5-6 20:51:23
|
显示全部楼层
我的錯誤如下
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/hello_miai.py", line 93, in _get_sign
self._cookies['pass_ua']=self._request.cookies.get_dict()['pass_ua']
KeyError: 'pass_ua'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/core.py", line 1014, in _event_to_service_call
await self._hass.async_add_job(execute_service)
File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
raise self._exception
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/core.py", line 1011, in execute_service
service_handler.func(service_call)
File "/config/custom_components/hello_miai.py", line 50, in send_message
client = xiaomi_tts(miid, password,login_info_dir=hass.config.config_dir+'/.xiaoai')
File "/config/custom_components/hello_miai.py", line 81, in __init__
self._get_logon_info()
File "/config/custom_components/hello_miai.py", line 237, in _get_logon_info
self._serviceToken()
File "/config/custom_components/hello_miai.py", line 157, in _serviceToken
_serviceLoginAuth2_json=self._serviceLoginAuth2()
File "/config/custom_components/hello_miai.py", line 108, in _serviceLoginAuth2
self._sign=self._get_sign() #获取sign
File "/config/custom_components/hello_miai.py", line 98, in _get_sign
_LOGGER.error('_get_sign',e)
File "/usr/local/lib/python3.6/logging/__init__.py", line 1335, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/local/lib/python3.6/logging/__init__.py", line 1442, in _log
self.handle(record)
File "/usr/local/lib/python3.6/logging/__init__.py", line 1452, in handle
self.callHandlers(record)
File "/usr/local/lib/python3.6/logging/__init__.py", line 1514, in callHandlers
hdlr.handle(record)
File "/usr/local/lib/python3.6/logging/__init__.py", line 863, in handle
self.emit(record)
File "/usr/src/app/homeassistant/components/system_log/__init__.py", line 131, in emit
entry = self._create_entry(record, stack)
File "/usr/src/app/homeassistant/components/system_log/__init__.py", line 110, in _create_entry
'message': record.getMessage(),
File "/usr/local/lib/python3.6/logging/__init__.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting |
|