|
发表于 2020-9-17 12:01:48
|
显示全部楼层
大佬,我按照你的步骤做的也是报错,报错如下:
2020-09-17 11:55:35 ERROR (SyncWorker_3) [homeassistant.loader] Error parsing manifest.json file at /home/pi/.homeassistant/custom_components/sonoff/manifest.json: Expecting value: line 2 column 1 (char 1)
2020-09-17 11:55:35 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sonoff. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/homeassistant/loader.py", line 436, in _load_file
module = importlib.import_module(path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/pi/.homeassistant/custom_components/sonoff/__init__.py", line 18, in <module>
from . import utils
File "/home/pi/.homeassistant/custom_components/sonoff/utils.py", line 17, in <module>
from Crypto.Random import get_random_bytes
ImportError: cannot import name 'get_random_bytes' from 'Crypto.Random' (/usr/local/lib/python3.8/dist-packages/Crypto/Random/__init__.py)
2020-09-17 11:55:43 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sonoff. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/homeassistant/loader.py", line 436, in _load_file
module = importlib.import_module(path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/pi/.homeassistant/custom_components/sonoff/__init__.py", line 18, in <module>
from . import utils
File "/home/pi/.homeassistant/custom_components/sonoff/utils.py", line 17, in <module>
from Crypto.Random import get_random_bytes
ImportError: cannot import name 'get_random_bytes' from 'Crypto.Random' (/usr/local/lib/python3.8/dist-packages/Crypto/Random/__init__.py)
2020-09-17 11:55:43 ERROR (MainThread) [homeassistant.setup] Setup failed for sonoff: Integration not found.
|
|