Exception in Tkinter callback Traceback (most recent call last): File "D:\Python\Lib\tkinter\__init__.py", line 1948, in __call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "D:\zjj\123.py", line 132, in pick5 w2.insert('end',str(row[0])+","+str(row[1])+","+auto16(decrypt(row[2],"123456"))+","+auto16(decrypt(row[3],"123456"))+"\n") ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\zjj\123.py", line 38, in decrypt plaintext1=str(int(cipher[i])^int(key_str[i%len(key_str)])) ^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'D'
时间: 2023-11-13 16:54:16 浏览: 53
这个错误是因为您在使用int()函数将字符串转换为整数时,字符串中包含了非十进制数字 'D',导致出现了 ValueError。请检查您的代码,确保输入的字符串都是可以被 int() 函数正确转换为整数的。如果您的字符串中包含非十进制数字,请使用相应的进制函数,如int(x, base=16)将16进制的字符串转换为整数。
阅读全文