Comments (12)
New command in docker-compose without setcap:
'bash' '-c' 'venv/bin/python -m mqtt_io /config.yml'
Log without setcap:
Collecting RPi.GPIO
Downloading RPi.GPIO-0.7.1.tar.gz (29 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: RPi.GPIO
Building wheel for RPi.GPIO (setup.py): started
Building wheel for RPi.GPIO (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.8
creating build/lib.linux-armv7l-3.8/RPi
copying RPi/__init__.py -> build/lib.linux-armv7l-3.8/RPi
creating build/lib.linux-armv7l-3.8/RPi/GPIO
copying RPi/GPIO/__init__.py -> build/lib.linux-armv7l-3.8/RPi/GPIO
running build_ext
building 'RPi._GPIO' extension
creating build/temp.linux-armv7l-3.8
creating build/temp.linux-armv7l-3.8/source
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/mqtt_io/venv/include -I/usr/local/include/python3.8 -c source/py_gpio.c -o build/temp.linux-armv7l-3.8/source/py_gpio.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for RPi.GPIO
Running setup.py clean for RPi.GPIO
Failed to build RPi.GPIO
ERROR: Could not build wheels for RPi.GPIO, which is required to install pyproject.toml-based projects
2024-03-06 22:17:41 mqtt_io.__main__ [ERROR] MqttIo crashed!
Traceback (most recent call last):
File "/home/mqtt_io/mqtt_io/modules/__init__.py", line 51, in install_missing_module_requirements
install_missing_requirements(pkgs_required)
File "/home/mqtt_io/mqtt_io/modules/__init__.py", line 22, in install_missing_requirements
check_call([sys.executable, "-m", "pip", "install"] + pkgs_required)
File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/mqtt_io/venv/bin/python', '-m', 'pip', 'install', 'RPi.GPIO']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/mqtt_io/mqtt_io/__main__.py", line 107, in main
mqtt_gpio.run()
File "/home/mqtt_io/mqtt_io/server.py", line 1447, in run
self._init_gpio_modules()
File "/home/mqtt_io/mqtt_io/server.py", line 273, in _init_gpio_modules
self.gpio_modules[gpio_config["name"]] = _init_module(
File "/home/mqtt_io/mqtt_io/server.py", line 127, in _init_module
install_missing_module_requirements(module)
File "/home/mqtt_io/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.gpio.raspberrypi' from '/home/mqtt_io/mqtt_io/modules/gpio/raspberrypi.py'> (['RPi.GPIO']): Command '['/home/mqtt_io/venv/bin/python', '-m', 'pip', 'install', 'RPi.GPIO']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/home/mqtt_io/mqtt_io/modules/__init__.py", line 51, in install_missing_module_requirements
install_missing_requirements(pkgs_required)
File "/home/mqtt_io/mqtt_io/modules/__init__.py", line 22, in install_missing_requirements
check_call([sys.executable, "-m", "pip", "install"] + pkgs_required)
File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/mqtt_io/venv/bin/python', '-m', 'pip', 'install', 'RPi.GPIO']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/mqtt_io/mqtt_io/__main__.py", line 115, in <module>
main()
File "/home/mqtt_io/mqtt_io/__main__.py", line 107, in main
mqtt_gpio.run()
File "/home/mqtt_io/mqtt_io/server.py", line 1447, in run
self._init_gpio_modules()
File "/home/mqtt_io/mqtt_io/server.py", line 273, in _init_gpio_modules
self.gpio_modules[gpio_config["name"]] = _init_module(
File "/home/mqtt_io/mqtt_io/server.py", line 127, in _init_module
install_missing_module_requirements(module)
File "/home/mqtt_io/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.gpio.raspberrypi' from '/home/mqtt_io/mqtt_io/modules/gpio/raspberrypi.py'> (['RPi.GPIO']): Command '['/home/mqtt_io/venv/bin/python', '-m', 'pip', 'install', 'RPi.GPIO']' returned non-zero exit status 1.
from mqtt-io.
Same error here
from mqtt-io.
Hi @Bluscream,
have you been on a normal PC in the while? :-D Can you provide more information, please?
I don't have the setup here for reproduction.
Thanks
Benni
from mqtt-io.
original docker-compose with setcap:
version: '3'
services:
mqtt-io:
privileged: true
user: root
image: flyte/mqtt-io
ports:
- "443:443"
- "1883:1883"
- "8883:8883"
- "14567:14567"
volumes:
- type: bind
source: /portainer/Files/AppData/Config/mqtt-io/config.yml
target: /config.yml
read_only: true
- /dev/i2c-0:/dev/i2c-0
- /dev/mem:/dev/mem
- /dev/gpiomem:/dev/gpiomem
devices:
- /dev/i2c-0
- /dev/mem
- /dev/gpiomem
command: >
bash -c "setcap 'cap_sys_rawio+eip' $(readlink -f venv/bin/python) && venv/bin/python -m mqtt_io /config.yml"
network_mode: host
from mqtt-io.
Hello,
i have the same Problem on Raspberry 4 with Debian 12 and Docker setup as described.
The previous Version was fine.
The same problem is on the Homeassistant Plugin which belongs to this project.
Look at this Issue RuntimeError: This module can only be run on a Raspberry Pi!
from mqtt-io.
Related Issues (20)
- Stream sensor (serial) not reliable
- Running mqtt-io as a service on Raspberry Pi
- Version 2.2.9 is not available on PyPI HOT 4
- Pinned PyYAML version incompatible with latest Cython 3.0.0 HOT 6
- continuous crashes on pi 3b+ HOT 4
- In case of reconnection to MQTT broker subscriptions are lost
- pip fails on pyyaml, poetry fails on requests.utils on a raspberry pi zero w HOT 8
- How to add and reuse values in config files? HOT 1
- Chip has no attribute 'OPEN_BY_NAME' - Orange Pi Zero HOT 2
- KeyError when trying to run on Orange Pi Zero 2W, Ubuntu 22.04 HOT 2
- Raspberry pi 5 support? HOT 2
- use RPIO instead of RPi.GPIO
- Separate Devices Running MQTT IO Are Recognized as a Single Device in Home Assistant HOT 1
- MQTT Io On OrangePi 5 HOT 1
- Issues with paho-mqtt 2.0 HOT 5
- Crash using gpiod HOT 1
- Release version 2.3.0
- Wont Connect to MQTT Broker and getting error in log from python script HOT 2
- DHT22 Adafruit_DHT problem HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mqtt-io.