Some imports in certain ZPUI apps are not in the emulator requirements (tricky to install, or not that necessary for core functionality). To be exact:
Traceback (most recent call last):
File "/home/pi/ZPUI/libs/matrix_client/matrix_client/client.py", line 21, in <module>
from .crypto.olm_device import OlmDevice
File "/home/pi/ZPUI/libs/matrix_client/matrix_client/crypto/olm_device.py", line 5, in <module>
import olm
ImportError: No module named olm
(this one is non-critical, it only prevents encryption from working in Matrix)
2. File "/home/pi/ZPUI/apps/app_manager.py", line 152, in load_all_apps
app = self.load_app(module_path)
File "/home/pi/ZPUI/apps/app_manager.py", line 204, in load_app
app = importlib.import_module(app_path + '.main', package='apps')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/pi/ZPUI/apps/network_apps/ssh/main.py", line 10, in <module>
from libs import systemctl
File "/home/pi/ZPUI/libs/systemctl.py", line 2, in <module>
from pydbus import SystemBus
File "/home/pi/venv/local/lib/python2.7/site-packages/pydbus/__init__.py", line 1, in <module>
from .bus import SystemBus, SessionBus, connect
File "/home/pi/venv/local/lib/python2.7/site-packages/pydbus/bus.py", line 1, in <module>
from gi.repository import Gio
ImportError: No module named gi.repository
(this one is critical as it prevents the systemctl app from working)
We need to silence those messages so that the logs are more readable when launching the emulator. Also, feel free to silence any additional ones. You can probably use the same technique that the nmap app does, printing a warning in logs and then showing a warning to the user when they try to enter the app
Thoughts:
Might also hide the apps from the main menu/submenus if the thing lacking is critical
But then, the user won't know about these apps' existence until they look into the logs?
We don't really have a good mechanism for "if this condition is true, do not show the app in the UI", the app won't show up if it doesn't have callback()/.on_start(), but something like conditional del will likely be an unwelcome hack. Something like "different return value for init_app to show the app is deactivated" could be a better idea, but then, restarting ZPUI to make an app work is something that is best avoided.
Some imports in certain ZPUI apps are not in the emulator requirements (tricky to install, or not that necessary for core functionality). To be exact:
(this one is non-critical, it only prevents encryption from working in Matrix)
(this one is critical as it prevents the systemctl app from working)
We need to silence those messages so that the logs are more readable when launching the emulator. Also, feel free to silence any additional ones. You can probably use the same technique that the nmap app does, printing a warning in logs and then showing a warning to the user when they try to enter the app
Thoughts:
callback()
/.on_start()
, but something like conditionaldel
will likely be an unwelcome hack. Something like "different return value forinit_app
to show the app is deactivated" could be a better idea, but then, restarting ZPUI to make an app work is something that is best avoided.