【初始化内置VLC播放器】出现错误 no function 'libvlc_new'
2019-11-10 10:45:47 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.ha_cloud_music fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 268, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 448, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ha_cloud_music/media_player.py", line 416, in update
self._state = self._media.state
AttributeError: 'NoneType' object has no attribute 'state'
在 docker 外以下代码不会报错
pi@raspberrypi:~ $ python
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vlc
>>> instance = vlc.Instance()
>>> v = instance.media_player_new()
pi@raspberrypi:~ $ python
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vlc
>>> instance = vlc.Instance()
>>> v = instance.media_player_new()