I'm writing a little program using the RFID libary from Github(https://github.com/mxgxw/MFRC522-python). When I extract the data from the tag and convert it into an integer to work with it I get an Error like this
Code: Select all
ValueError: invalid literal for int(): 10I also know that \x00 stands for Null in HEX, and I also found a solution to solve the problem. My actual code snipped is'10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Code: Select all
DecimalValueCard= MIFAREReader.MFRC522_Read(BlockID)
Variable = ''.join(chr(i) for i in DecimalValueCard)
print(repr(Variable .strip('\x00')))
print(repr(Variable .strip("'")))
print(repr(Variable ))