(homeassistant) ~ $ hass
2021-06-21 23:14:46 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //data/data/com.termux/files/home/.homeassistant/home-assistant_v2.db was shutdown cleanly
2021-06-21 23:14:46 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=2 from 2021-06-21 15:11:06.330333)
2021-06-21 23:14:47 ERROR (MainThread) [homeassistant.setup] Setup failed for image: Unable to import component: cannot import name '_imaging' from 'PIL' (/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/PIL/__init__.py)
2021-06-21 23:14:47 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of person. Setup failed for dependencies: image
2021-06-21 23:14:47 ERROR (MainThread) [homeassistant.setup] Setup failed for person: Could not set up all dependencies.
2021-06-21 23:14:47 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: person
2021-06-21 23:14:47 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
2021-06-21 23:14:47 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: onboarding
2021-06-21 23:14:47 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2021-06-21 23:14:49 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of my. Setup failed for dependencies: frontend
2021-06-21 23:14:49 ERROR (MainThread) [homeassistant.setup] Setup failed for my: Could not set up all dependencies.
2021-06-21 23:14:49 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
2021-06-21 23:14:49 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
2021-06-21 23:14:49 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
2021-06-21 23:14:49 ERROR (MainThread) [homeassistant.setup] Setup failed for map: Could not set up all dependencies.
2021-06-21 23:14:49 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of mobile_app. Setup failed for dependencies: person
2021-06-21 23:14:49 ERROR (MainThread) [homeassistant.setup] Setup failed for mobile_app: Could not set up all dependencies.
2021-06-21 23:15:55 ERROR (MainThread) [homeassistant.setup] Setup failed for dhcp: unknown error
Traceback (most recent call last):
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 200, in _async_setup_component
component = integration.get_component()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 490, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/data/data/com.termux/files/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/homeassistant/components/dhcp/__init__.py", line 17, in <module>
from scapy.arch.common import compile_filter
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/arch/__init__.py", line 135, in <module>
_set_conf_sockets() # Apply config
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/config.py", line 618, in _set_conf_sockets
conf.ifaces.reload()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/interfaces.py", line 238, in reload
self._reload_provs()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/interfaces.py", line 234, in _reload_provs
self._load(prov.reload(), prov)
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/interfaces.py", line 53, in reload
return self.load()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/arch/linux.py", line 420, in load
get_if_raw_hwaddr(i, siocgifhwaddr=SIOCGIFHWADDR)[1]
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/arch/common.py", line 87, in get_if_raw_hwaddr
get_if(iff, siocgifhwaddr)
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/arch/common.py", line 65, in get_if
return ioctl(sck, cmd, struct.pack("16s16x", iff.encode("utf8")))
PermissionError: [Errno 13] Permission denied
2021-06-21 23:16:04 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: zeroconf
2021-06-21 23:16:52 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: dhcp, frontend, logbook, map, mobile_app, my, person
2021-06-21 23:16:52 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.
2021-06-21 23:16:52 WARNING (MainThread) [homeassistant.bootstrap] Detected that frontend did not load. Activating safe mode
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Setup failed for image: Unable to import component: cannot import name '_imaging' from 'PIL' (/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/PIL/__init__.py)
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of person. Setup failed for dependencies: image
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Setup failed for person: Could not set up all dependencies.
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: person
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: onboarding
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of safe_mode. Setup failed for dependencies: frontend
2021-06-21 23:16:53 ERROR (MainThread) [homeassistant.setup] Setup failed for safe_mode: Could not set up all dependencies.
^C(homeassistant) ~ $ ^C
(homeassistant) ~ $ from PIL import _imaging
No command from found, did you mean:
Command frob in package frobtads
(homeassistant) ~ $ hass
2021-06-21 23:30:03 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //data/data/com.termux/files/home/.homeassistant/home-assistant_v2.db was shutdown cleanly
2021-06-21 23:30:03 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=3 from 2021-06-21 15:14:46.378579)
2021-06-21 23:30:04 ERROR (MainThread) [homeassistant.setup] Setup failed for image: Unable to import component: cannot import name '_imaging' from 'PIL' (/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/PIL/__init__.py)
2021-06-21 23:30:04 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of person. Setup failed for dependencies: image
2021-06-21 23:30:04 ERROR (MainThread) [homeassistant.setup] Setup failed for person: Could not set up all dependencies.
2021-06-21 23:30:04 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: person
2021-06-21 23:30:04 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
2021-06-21 23:30:04 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: onboarding
2021-06-21 23:30:04 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2021-06-21 23:30:07 ERROR (MainThread) [homeassistant.setup] Setup failed for dhcp: unknown error
Traceback (most recent call last):
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 200, in _async_setup_component
component = integration.get_component()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 490, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/data/data/com.termux/files/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/homeassistant/components/dhcp/__init__.py", line 17, in <module>
from scapy.arch.common import compile_filter
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/arch/__init__.py", line 135, in <module>
_set_conf_sockets() # Apply config
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/config.py", line 618, in _set_conf_sockets
conf.ifaces.reload()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/interfaces.py", line 238, in reload
self._reload_provs()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/interfaces.py", line 234, in _reload_provs
self._load(prov.reload(), prov)
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/interfaces.py", line 53, in reload
return self.load()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/arch/linux.py", line 420, in load
get_if_raw_hwaddr(i, siocgifhwaddr=SIOCGIFHWADDR)[1]
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/arch/common.py", line 87, in get_if_raw_hwaddr
get_if(iff, siocgifhwaddr)
File "/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/scapy/arch/common.py", line 65, in get_if
return ioctl(sck, cmd, struct.pack("16s16x", iff.encode("utf8")))
PermissionError: [Errno 13] Permission denied
2021-06-21 23:30:07 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
2021-06-21 23:30:07 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
2021-06-21 23:30:07 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of my. Setup failed for dependencies: frontend
2021-06-21 23:30:07 ERROR (MainThread) [homeassistant.setup] Setup failed for my: Could not set up all dependencies.
2021-06-21 23:30:07 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
2021-06-21 23:30:07 ERROR (MainThread) [homeassistant.setup] Setup failed for map: Could not set up all dependencies.
2021-06-21 23:30:08 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of mobile_app. Setup failed for dependencies: person
2021-06-21 23:30:08 ERROR (MainThread) [homeassistant.setup] Setup failed for mobile_app: Could not set up all dependencies.
2021-06-21 23:30:08 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: dhcp, frontend, logbook, map, mobile_app, my, person
2021-06-21 23:30:08 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.
2021-06-21 23:30:08 WARNING (MainThread) [homeassistant.bootstrap] Detected that frontend did not load. Activating safe mode
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Setup failed for image: Unable to import component: cannot import name '_imaging' from 'PIL' (/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/PIL/__init__.py)
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of person. Setup failed for dependencies: image
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Setup failed for person: Could not set up all dependencies.
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: person
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: onboarding
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of safe_mode. Setup failed for dependencies: frontend
2021-06-21 23:30:09 ERROR (MainThread) [homeassistant.setup] Setup failed for safe_mode: Could not set up all dependencies.
^C(homeassistant) ~ $ ^C
我的理解是由于第一个报错导致后面的都无法进行下去
(homeassistant) ~ $ hass
2021-06-21 23:14:46 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //data/data/com.termux/files/home/.homeassistant/home-assistant_v2.db was shutdown cleanly
2021-06-21 23:14:46 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=2 from 2021-06-21 15:11:06.330333)
2021-06-21 23:14:47 ERROR (MainThread) [homeassistant.setup] Setup failed for image: Unable to import component: cannot import name '_imaging' from 'PIL' (/data/data/com.termux/files/home/homeassistant/lib/python3.9/site-packages/PIL/__init__.py)
cannot import name '_imaging' from 'PIL'
搜索很久都没有找到解决方案,希望大神能够解答。拜谢!!
~ $ pip install pillow==8.1.2
Looking in indexes: https://mirrors.ustc.edu.cn/pypi/web/simple
Collecting pillow==8.1.2
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/60/f0/dd2eb7911f948bf529f58f0c7931f6f6466f711bd6f1d81a69dc4edd4e2a/Pillow-8.1.2.tar.gz (45.2 MB)
|████████████████████████████████| 45.2 MB 3.1 MB/s
Using legacy 'setup.py install' for pillow, since package 'wheel' is not installed.
Installing collected packages: pillow
Running setup.py install for pillow ... error
ERROR: Command errored out with exit status 1:
command: /data/data/com.termux/files/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-x_m1lg8s/pillow_b121068ed5574a77a604e927e0a5e23a/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-x_m1lg8s/pillow_b121068ed5574a77a604e927e0a5e23a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-_7tolwbg/install-record.txt --single-version-externally-managed --compile --install-headers /data/data/com.termux/files/usr/include/python3.9/pillow
cwd: /data/data/com.termux/files/usr/tmp/pip-install-x_m1lg8s/pillow_b121068ed5574a77a604e927e0a5e23a/
解决如下:
~ $ apt install libjpeg-turbo
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
libjpeg-turbo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 279 kB of archives.
After this operation, 1421 kB of additional disk space will be used.
Get:1 https://packages.termux.org/apt/termux-main stable/main aarch64 libjpeg-turbo aarch64 2.1.0 [279 kB]
Fetched 279 kB in 3s (109 kB/s)
Selecting previously unselected package libjpeg-turbo.
(Reading database ... 12958 files and directories currently installed.)
Preparing to unpack .../libjpeg-turbo_2.1.0_aarch64.deb ...
Unpacking libjpeg-turbo (2.1.0) ...
Setting up libjpeg-turbo (2.1.0) ...
~ $ pip install pillow==8.1.2
Looking in indexes: https://mirrors.ustc.edu.cn/pypi/web/simple
Collecting pillow==8.1.2
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/60/f0/dd2eb7911f948bf529f58f0c7931f6f6466f711bd6f1d81a69dc4edd4e2a/Pillow-8.1.2.tar.gz (45.2 MB)
|████████████████████████████████| 45.2 MB 1.5 MB/s
Using legacy 'setup.py install' for pillow, since package 'wheel' is not installed.
Installing collected packages: pillow
Running setup.py install for pillow ... done
Successfully installed pillow-8.1.2
我安装完后,注册成功,但设置位置时一直报错,不知道为啥,题主遇到了没?
2021-06-22 21:59:41 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [500572089312] Error handling message: Invalid time zone passed in. Valid options can be found here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones for dictionary value @ data['time_zone']. Got 'America/Denver'
2021-06-22 21:59:52 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [500572089312] Error handling message: Invalid time zone passed in. Valid options can be found here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones for dictionary value @ data['time_zone']. Got 'Asia/Shanghai'