i3pystatus: GPU module: ImportError(No module named 'i3pystatus.utils')
Hello all,
I’ve been converting a few videos with GPU acceleration, and due to the recent issues with EVGA units overheating wanted to monitor my temperature.
I can do this from the command-line with watch nvidia-smi -q -d temperature
, but can’t create a module in my status bar because of an issue importing i3pystatus.utils.
I’m running i3pystatus-git 3.35.r81.ga9ff574-1
, and my i3pystatus config looks like this:
from i3pystatus import Status
status = Status(logfile='/var/log/jcf/i3pystatus.log',
logformat='%(asctime) %(levelname)s:')
color_text = "#AAAAAA"
def smaller(s):
return "<span size='smaller'>{}</span>".format(s)
status.register("clock",
hints={"markup": "pango"},
format=smaller("%a %d %b %H:%M"),
on_leftclick="gnome-calendar")
status.register("alsa",
hints={"markup": "pango"},
format=smaller(" {volume:3.0f}/100"))
status.register("temp",
hints={"markup": "pango"},
format=smaller("{temp:.0f}°C"),
on_leftclick="gnome-system-monitor --show-processes-tab")
status.register("cpu_usage",
hints={"markup": "pango", "separator": False, "separator_block_width": 0},
format=smaller(" {usage:3.0f}% "),
on_leftclick="gnome-system-monitor --show-processes-tab")
status.register("gpu_temp",
hints={"markup": "pango"},
format=smaller(" {temp:.0f}°C"))
status.register("network",
color_up=color_text,
color_down=color_text,
# divisor=2**20,
dynamic_color=False,
hints={"markup": "pango"},
format_up=smaller(" {bytes_recv:5.0f} KB/s {bytes_sent:5.0f} KB/s"),
interface="eno1",
on_leftclick="gnome-system-monitor --show-resources-tab")
status.run()
I’m guessing the issue is with importing .utils
, but I’m not super experienced with Python…
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (7 by maintainers)
@jcf it should be, but I can’t check (I don’t have an Nvidia). There could still be other problems.
UPD Or not. The commit that introduced this bug says that
self.display_if
must be a Python expression string to be evaluated. So it is better just to change default to"True"
. Ah, @jcf you can just adddisplay_if='True'
(note the quotes) instatus.register('gpu_temp')
to fix it immediately.