question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[dev] modules.contrib.nvidiagpu is broken when there's a Nvidia GPU

See original GitHub issue

Bug Report

Summary

Affected module: contrib.nvidiagpu

Description:

Happens in revision a8ab4f95 for me.

File "/mnt/d2/downloads/work/bumblebee-status/modules/contrib/nvidiagpu.py", line 28, in hidden
if "not found" in self._utilization.startswith("not found"):
AttributeError: 'Module' object has no attribute '_utilization'

First glance shows a naming inconsistency most likely due to a typo, because the name lacks an underscore compared to the one from Module.__init__()

Adding an underscore produces a different error:

File "/mnt/d2/downloads/work/bumblebee-status/modules/contrib/nvidiagpu.py", line 28, in hidden
if "not found" in self.__utilization.startswith("not found"):

TypeError: argument of type ‘bool’ is not iterable

A deeper look at this of course shows there’s something wrong with it.

I’ll try to submit a pull request that fixes it for me in a few minutes, but I have no way to test it on a setup when the Nvidia GPU is missing, try testing that use case too if possible before merging, it would be a shame if the change that fixes it for me will break it for others.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, May 2, 2020

Updated the repo after your fix and bumblebee-status runs correctly, feel free to close.

0reactions
tobi-wan-kenobicommented, May 2, 2020

Yes, please. I was really torn between the two solutions (as the initial bug clearly demonstrated), but I think searching for ‘not found’ in the whole string should make the solution slightly more stable when the tool’s output changes slightly.

Thanks for the quick PR, though!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to properly install/uninstall Cuda on Ubuntu 18.04
Hello, everyone! I recently got Ubuntu 18.04, and I tried to install Cuda in it. However, I am getting an error, and I...
Read more >
Nvidia Driver Broken on Update - Unable to Reinstall
I used Nvidia driver 470 and Kernel 5.13.0.26, then after reboot I got Kernel .27 and no wifi, I had that problem recently...
Read more >
NVIDIA/nvidia-drivers - Gentoo Wiki
NVIDIA packages a daemon called nvidia-persistenced to assist in situations where the tearing down of the GPU device state isn't desired.
Read more >
NvidiaGraphicsDrivers - Debian Wiki
The NVIDIA graphics processing unit (GPU) series/codename of an installed video card can usually be identified using the lspci command.
Read more >
Tensorflow doesn't seem to see my gpu - Stack Overflow
Update 2020 · find versions of CUDA Toolkit and cuDNN SDK, that you need. a) find your tf version · install CUDA Toolkit....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found