AttributeError: 'str' object has no attribute 'get'
zylok520 opened this issue · 1 comments
zylok520 commented
Logger: homeassistant.setup
Source: custom_components/ha_baidu_map/init.py:17
First occurred: 下午8:10:43 (1 occurrences)
Last logged: 下午8:10:43
Error during setup of component ha_baidu_map
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ha_baidu_map/init.py", line 17, in setup
_name = cfg.get('name', '百度地图')
AttributeError: 'str' object has no attribute 'get'
申请了浏览器AK
ha_baidu_map:
ak:cwSYQbW4G0aoY***********OLtYEc
配置了AK会报错。 不配置正常。
请教一下
shaonianzhentan commented
注意缩进语法