Here is the output without the fix:
Traceback (most recent call last):
File "/usr/bin/nvidia-detector", line 8, in <module>
a = NvidiaDetection(printonly=True, verbose=False)
File "/usr/lib/python3/dist-packages/NvidiaDetector/nvidiadetector.py", line 73, in __init__
self.getData()
File "/usr/lib/python3/dist-packages/NvidiaDetector/nvidiadetector.py", line 163, in getData
driver_version = self.__get_value_from_name(stripped_package_name)
File "/usr/lib/python3/dist-packages/NvidiaDetector/nvidiadetector.py", line 92, in __get_value_from_name
v = int(name)
ValueError: invalid literal for int() with base 10: 'server'
Here are is my solution:
In function
# line 88
def __get_value_from_name(self, name):
'''Get the integer associated to the name of a driver'''
v = self.__driver_aliases.get(name)
if v is None:
if name.isdigit(): # I made sure is an int.
v = int(name)
return v
# in line 164 I replaced with :
if not (driver_version := self.__get_value_from_name(stripped_package_name)): continue
Here is the output without the fix: nvidia- detector" , line 8, in <module> (printonly= True, verbose=False) python3/ dist-packages/ NvidiaDetector/ nvidiadetector. py", line 73, in __init__ python3/ dist-packages/ NvidiaDetector/ nvidiadetector. py", line 163, in getData get_value_ from_name( stripped_ package_ name) python3/ dist-packages/ NvidiaDetector/ nvidiadetector. py", line 92, in __get_value_ from_name
Traceback (most recent call last):
File "/usr/bin/
a = NvidiaDetection
File "/usr/lib/
self.getData()
File "/usr/lib/
driver_version = self.__
File "/usr/lib/
v = int(name)
ValueError: invalid literal for int() with base 10: 'server'
Here are is my solution:
In function from_name( self, name): driver_ aliases. get(name)
# line 88
def __get_value_
'''Get the integer associated to the name of a driver'''
v = self.__
if v is None:
if name.isdigit(): # I made sure is an int.
v = int(name)
return v
# in line 164 I replaced with : get_value_ from_name( stripped_ package_ name)):
continue
if not (driver_version := self.__