I would like to order a dictionary by value from highest to lowest. THe dict is like this:
{'data1': {'/home/data1': 273}, 'data2': {'/home/data2': 2}, 'data3': {'/home/data3': 10}, 'data4': {'/home/data4': 1}}
I got some code that works in one VM, but when i try in other one doesn't works.
dict = sorted(dicta.items(), key=lambda x: [int(x) for x in x[1].values()], reverse = True)
In one VM i got this error, while in other one it works (using a virtualenv to execute the same script with same python version etc.)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
ANy ideas?