I was trying to setup this addon and I had made a config.yml file and everything, but when I started the addon after a while it crashed and if I tried to start the addon once more, it would crash on the same spot again.
× Running setup.py install for Adafruit_DHT did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
running install
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.10
creating build/lib.linux-armv7l-3.10/Adafruit_DHT
copying Adafruit_DHT/common.py -> build/lib.linux-armv7l-3.10/Adafruit_DHT
copying Adafruit_DHT/platform_detect.py -> build/lib.linux-armv7l-3.10/Adafruit_DHT
copying Adafruit_DHT/Beaglebone_Black.py -> build/lib.linux-armv7l-3.10/Adafruit_DHT
copying Adafruit_DHT/__init__.py -> build/lib.linux-armv7l-3.10/Adafruit_DHT
copying Adafruit_DHT/Test.py -> build/lib.linux-armv7l-3.10/Adafruit_DHT
copying Adafruit_DHT/Raspberry_Pi_2.py -> build/lib.linux-armv7l-3.10/Adafruit_DHT
copying Adafruit_DHT/Raspberry_Pi.py -> build/lib.linux-armv7l-3.10/Adafruit_DHT
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'Adafruit_DHT.Raspberry_Pi_2_Driver' extension
creating build/temp.linux-armv7l-3.10
creating build/temp.linux-armv7l-3.10/source
creating build/temp.linux-armv7l-3.10/source/Raspberry_Pi_2
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fomit-frame-pointer -g -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.10 -c source/Raspberry_Pi_2/pi_2_dht_read.c -o build/temp.linux-armv7l-3.10/source/Raspberry_Pi_2/pi_2_dht_read.o -std=gnu99
error: command 'gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> Adafruit_DHT
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
2022-07-25 12:21:53 mqtt_io.__main__ [ERROR] MqttIo crashed!
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/mqtt_io/modules/__init__.py", line 51, in install_missing_module_requirements
install_missing_requirements(pkgs_required)
File "/usr/lib/python3.10/site-packages/mqtt_io/modules/__init__.py", line 22, in install_missing_requirements
check_call([sys.executable, "-m", "pip", "install"] + pkgs_required)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'install', 'Adafruit_DHT']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/mqtt_io/__main__.py", line 107, in main
mqtt_gpio.run()
File "/usr/lib/python3.10/site-packages/mqtt_io/server.py", line 1230, in run
self._init_sensor_modules()
File "/usr/lib/python3.10/site-packages/mqtt_io/server.py", line 255, in _init_sensor_modules
self.sensor_modules[sens_config["name"]] = _init_module(
File "/usr/lib/python3.10/site-packages/mqtt_io/server.py", line 124, in _init_module
install_missing_module_requirements(module)
File "/usr/lib/python3.10/site-packages/mqtt_io/modules/__init__.py", line 53, in install_missing_module_requirements
raise CannotInstallModuleRequirements(
mqtt_io.exceptions.CannotInstallModuleRequirements: Unable to install packages for module <module 'mqtt_io.modules.sensor.dht22' from '/usr/lib/python3.10/site-packages/mqtt_io/modules/sensor/dht22.py'> (['Adafruit_DHT']): Command '['/usr/bin/python3', '-m', 'pip', 'install', 'Adafruit_DHT']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/mqtt_io/modules/__init__.py", line 51, in install_missing_module_requirements
install_missing_requirements(pkgs_required)
File "/usr/lib/python3.10/site-packages/mqtt_io/modules/__init__.py", line 22, in install_missing_requirements
check_call([sys.executable, "-m", "pip", "install"] + pkgs_required)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'install', 'Adafruit_DHT']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.10/site-packages/mqtt_io/__main__.py", line 115, in <module>
main()
File "/usr/lib/python3.10/site-packages/mqtt_io/__main__.py", line 107, in main
mqtt_gpio.run()
File "/usr/lib/python3.10/site-packages/mqtt_io/server.py", line 1230, in run
self._init_sensor_modules()
File "/usr/lib/python3.10/site-packages/mqtt_io/server.py", line 255, in _init_sensor_modules
self.sensor_modules[sens_config["name"]] = _init_module(
File "/usr/lib/python3.10/site-packages/mqtt_io/server.py", line 124, in _init_module
install_missing_module_requirements(module)
File "/usr/lib/python3.10/site-packages/mqtt_io/modules/__init__.py", line 53, in install_missing_module_requirements
raise CannotInstallModuleRequirements(
mqtt_io.exceptions.CannotInstallModuleRequirements: Unable to install packages for module <module 'mqtt_io.modules.sensor.dht22' from '/usr/lib/python3.10/site-packages/mqtt_io/modules/sensor/dht22.py'> (['Adafruit_DHT']): Command '['/usr/bin/python3', '-m', 'pip', 'install', 'Adafruit_DHT']' returned non-zero exit status 1.
[12:21:54] WARNING: MQTT IO crashed, halting add-on
s6-rc: info: service legacy-services: stopping
[12:21:54] INFO: MQTT IO stopped
Start the addon with a fresh install.