我有一个金字塔项目,在使用 development.ini 托管时可以正常工作,但是一旦我使用 production.ini,我就会在浏览器中收到此错误:
Internal Server Error
The server encountered an unexpected internal server error
(generated by waitress)
这个登录终端:
Starting subprocess with file monitor
Starting server in PID 5912.
serving on http://0.0.0.0:6543
2014-05-26 16:54:23,139 ERROR [waitress][Dummy-2] Exception when serving /
Traceback (most recent call last):
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/waitress-0.8.9-py2.7.egg/waitress/channel.py", line 337, in service
task.service()
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/waitress-0.8.9-py2.7.egg/waitress/task.py", line 173, in service
self.execute()
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/waitress-0.8.9-py2.7.egg/waitress/task.py", line 392, in execute
app_iter = self.channel.server.application(env, start_response)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/router.py", line 242, in __call__
response = self.invoke_subrequest(request, use_tweens=True)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/router.py", line 217, in invoke_subrequest
response = handle_request(request)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
response = handler(request)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid_tm-0.7-py2.7.egg/pyramid_tm/__init__.py", line 82, in tm_tween
reraise(*exc_info)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid_tm-0.7-py2.7.egg/pyramid_tm/__init__.py", line 63, in tm_tween
response = handler(request)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/router.py", line 163, in handle_request
response = view_callable(context, request)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/config/views.py", line 377, in rendered_view
context)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/renderers.py", line 418, in render_view
return self.render_to_response(response, system, request=request)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/renderers.py", line 441, in render_to_response
result = self.render(value, system_values, request=request)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/renderers.py", line 421, in render
renderer = self.renderer
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/decorator.py", line 37, in __get__
val = self.wrapped(inst)
File "/home/roman/Critical_ID/CCG_Map/local/lib/python2.7/site-packages/pyramid/renderers.py", line 404, in renderer
'No such renderer factory %s' % str(self.type))
ValueError: No such renderer factory .mak
我复制了.ini 文件中的部分sqlalchemy.url
和部分,但看不到导致此错误的原因。mako.directories
[app:main]
我启动服务器:../bin/pserve/production.ini --reload
我错过了什么?