SAEspot » saespot (43)

发帖时出错

By jat at 2012-12-10 23:41:39

Log如下:
Traceback (most recent call last):
File "/base/data/home/apps/s~sinosky-bbs/1.363727106485507546/yui.py", line 1461, in __call__
handler.post(*groups, **groupdict)
File "/base/data/home/apps/s~sinosky-bbs/1.363727106485507546/view.py", line 514, in post
con_md5 = md5(content.encode('utf-8')).hexdigest()
NameError: global name 'md5' is not defined

2 回复 | 直到 2012-12-11 21:05:20
saespot at 2012-12-11 19:49:04
1

在view.py上面
import json 下面加上一行
from hashlib import md5

jat at 2012-12-11 21:05:20
2

已解决,多谢