用SAEspot GAE版搭建了个站点,但是发帖出问题,对Python不懂,请问怎么办
提示的错误信息
The server is temporary error now. 500
Traceback (most recent call last): File "/base/data/home/apps/s~philohub/1.375961773634405806/yui.py", line 1461, in __call__ handler.post(*groups, **groupdict) File "/base/data/home/apps/s~philohub/1.375961773634405806/view.py", line 514, in post con_md5 = md5(content.encode('utf-8')).hexdigest() NameError: global name 'md5' is not defined
站点地址
www.ihub.ml
在view.py 里面添加下面一行。
from hashlib import md5
添加位置在头部,参见其他import 模块的地方。
@saespot
发现新问题
分类简介有换行的时候,会提示错误,如下:
The server is temporary error now. 500
Traceback (most recent call last): File "/base/data/home/apps/s~philohub/1.375986870822839366/yui.py", line 1461, in __call__ handler.post(*groups, **groupdict) File "/base/data/home/apps/s~philohub/1.375986870822839366/view.py", line 700, in post n_obj.about = about File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/db/__init__.py", line 614, in __set__ value = self.validate(value) File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/db/__init__.py", line 2847, in validate raise BadValueError('Property %s is not multi-line' % self.name) BadValueError: Property about is not multi-line