我已经很好地配置了 OSQA Django,但是当我尝试这个 url 时如何纠正这个问题:
http://localhost/questions/ask/
在调试模式中:
TypeError at /questions/ask/
'NoneType' object is not iterable
Request Method: GET
Request URL: http://localhost/questions/ask/
Django Version: 1.6
Exception Type: TypeError
Exception Value:
'NoneType' object is not iterable
Exception Location: /home/mm/osqa/osqa-server/forum/markdownext/mdx_settingsparser.py in __init__, line 13 :
Python Executable: /usr/bin/python
Python Version: 2.7.6
Python Path:
['/usr/local/lib/python2.7/dist-packages/South-1.0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/django_debug_toolbar-1.2.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/sqlparse-0.1.12-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/Markdown-2.5-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/html5lib-1.0b3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/python_openid-2.2.5-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/Django-1.6-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/elementtree-1.2.7_20070827_preview-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/ipython-2.2.0-py2.7.egg',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PILcompat',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/home/marwen/osqa',
'/home/marwen/osqa/osqa-server',
'/home/marwen/osqa/osqa-server/forum/markdownext']
Server time: Fri, 26 Sep 2014 11:17:48 -0400
使用代码行 13 进行编辑:
for key, value in configs:
self.config[key] = value