我想在把变量转换成整数后给它赋值。我的代码:
timStamp = int(time.time()) // 30
但我得到了以下错误:
^{pr2}$
我也试过:
timStamp = time.time() // 30
这次我得到了:
TypeError: 'float' does not support the buffer interface
我已经在谷歌上搜索过了,但是我没有找到我想要的答案。
N: B:我正在使用Python3,我的完整源代码如下所示
http://paste.ubuntu.com/10584501/
Tags:
您应该查看完整的回溯,看看错误发生在哪里。在这种情况下,代码产生
所以问题是
base64.b16encode
需要一个字节字符串,而被赋予int或float。在但是,我可以理解这种混乱,因为这个异常比您提供的行晚了一行。在
相关问题 更多 >
编程相关推荐