RuntimeError:升级后超出最大递归深度

时间:2013-09-02 06:19:05

标签: python django django-wsgi

我已将Django从1.4.5升级到1.5.2,现在我的网站无效。我收到这个错误:

 RuntimeError: maximum recursion depth exceeded

我使用virtualenv但由于某种原因在日志中有默认python安装的路径:

[Mon Sep 02 11:00:03 2013] [error] [client XXX.XXX.XXX]   File "/usr/local/lib/python2.7/functools.py", line 56, in <lambda>

也许这是WSGI配置的问题。这是它的配置:

<VirtualHost XXX.XXX.XXX.XXX:81 >
        AddDefaultCharset utf-8
        ServerName mywebsite.com
        CustomLog /var/www/httpd-logs/mywebsite.com.access.log combined
        DocumentRoot /var/www/empirik/data/www/mywebsite.com
        ErrorLog /var/www/httpd-logs/mywebsite.com.error.log
        ServerAdmin my@mail.com
        ServerAlias www.mywebsite.com
        SuexecUserGroup empirik empirik

        WSGIProcessGroup mywebsite.com
        WSGIScriptAlias / /var/www/empirik/data/www/mywebsite.com/katalog/wsgi.py
        WSGIDaemonProcess mywebsite.com \
                python-path=/home/envs/katalog/lib/python2.7/site-packages \
                python-home=/home/envs/katalog
        Alias /static/ /var/www/empirik/data/www/mywebsite.com/katalog/static/

        <Directory /var/www/empirik/data/www/mywebsite.com/katalog>
                Order deny,allow
                Allow from All
        </Directory>

        <Directory /var/www/empirik/data/www/mywebsite.com/katalog/static>
                Order deny,allow
                Allow from all
        </Directory>

</VirtualHost>

更新: 这是完整的日志:http://pastebin.com/wtfq6Rs3

1 个答案:

答案 0 :(得分:2)

检查您正在运行的python版本。我刚刚遇到类似的问题,用Django运行python 2.7.3。更新到python 2.7.5后,它成功运行。