1

我已将 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

4

1 回答 1

2

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

于 2013-09-18T16:19:37.730 回答