archey
archey copied to clipboard
Error on Ubuntu 12.04
Package version: 0.2.8 Operating System: Ubuntu 12.04 LTS Python version: 2.7.3 Error message (when launching "archey" command):
Traceback (most recent call last):
File "/usr/bin/archey", line 304, in
With python 3.2.3 the error is still present, but last line is different:
ValueError: inalid literal for float(): 5,0
It's the comma. I put a print statement on the line before this one and ran it on a machine where the error appeared, it gave me this: used: 2,3T -- size: 3,6T The commas are tripping it up. Python expects dots, not commas in floats.
I changed the two preceding lines to:
used = re.sub(",",".",total.split()[3])
size = re.sub(",",".",total.split()[2])
And voila! Problem fixed.
Quick fix:
used = used.replace(',','.')
@jherazob your tip works for me, thanks!