使用wsgi在httpd上找不到Rpy2'show'

时间:2012-02-23 19:19:34

标签: django wsgi rpy2

在开发服务器上一切正常。但是,当我将项目移动到运行httpd和wsgi的生产服务器时,显示以下错误。

TemplateSyntaxError at /

Caught LookupError while rendering: 'show' not found

Request Method:     GET
Request URL:    http://10.14.5.18/
Django Version:     1.3
Exception Type:     TemplateSyntaxError
Exception Value:    

Caught LookupError while rendering: 'show' not found

Exception Location:     /usr/local/python2.7.2/lib/python2.7/site-packages/rpy2/robjects/robject.py in RObjectMixin, line 22
Python Executable:  /usr/bin/python
Python Version:     2.7.2
Python Path:    

['/usr/local/python2.7.2/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
 '/usr/local/python2.7.2/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
 '/usr/local/python2.7.2/lib/python2.7/site-packages/django_pagination-1.0.5-py2.7.egg',
 '/usr/local/python2.7.2/lib/python27.zip',
 '/usr/local/python2.7.2/lib/python2.7',
 '/usr/local/python2.7.2/lib/python2.7/plat-linux2',
 '/usr/local/python2.7.2/lib/python2.7/lib-tk',
 '/usr/local/python2.7.2/lib/python2.7/lib-old',
 '/usr/local/python2.7.2/lib/python2.7/lib-dynload',
 '/usr/local/python2.7.2/lib/python2.7/site-packages',
 '/usr/local/python2.7.2/lib/python2.7/site-packages/PIL',
 '/srv/www/foodborn.project/']

Server time:    Thu, 23 Feb 2012 13:12:48 -0600

知道发生了什么事吗?感谢。

更新 跟踪Apache错误日志,发现类似“字节码不匹配”的内容。谷歌发现它与R.有关。所以重新编译R解决了这个问题。

1 个答案:

答案 0 :(得分:0)

TemplateSyntaxError告诉你Django / Python在模板文件中不喜欢的东西。你的模板中有{% ...show... %}之类的内容吗?找到你的模板并搜索“show”这个词,它试图渲染模板,但它不知道该怎么做。