Due to using NTAG213 and MFRC522 (RFID), so I read the database from NTAG213. So there's something that I changed, and you can see that the problem may in the "num_to_dec" but I confused how to change it. This is how the error looks:
And this is my code
so this is the code i tried:
def uid_to_num(self, uid):
n = 0
for i in range (0, 8): #due to ntag213 have 7 bytes UID
n = n*256 + uid[i] #error
return n
you can see in the image that I attached, and the error indicates to that line.