Django:ValueError:当前限制超过最大限制 [英] Django: ValueError: current limit exceeds maximum limit

查看:1293
本文介绍了Django:ValueError:当前限制超过最大限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在获得 ValueError:我的Django应用中的当前限制超出了最大限制。如果我从安装应用程序中删除干草堆,它会消失。我已经尝试升级haystack,降级干草堆,删除与haystack相关联的所有代码,但它仍然是一个问题。

I am getting ValueError: current limit exceeds maximum limit in my Django app. If I remove haystack from install apps, it goes away. I have tried upgrading haystack, downgrading haystack, removing all the code associated with haystack but it is still an issue.

完整追溯:

File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/user/pyProjects/projects/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/Users/user/pyProjects/projects/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
    django.setup()
  File "/Users/user/pyProjects/projects/env/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/user/pyProjects/projects/env/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/Users/user/pyProjects/projects/env/lib/python2.7/site-packages/django/apps/config.py", line 86, in create
    module = import_module(entry)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/user/pyProjects/projects/env/lib/python2.7/site-packages/haystack/__init__.py", line 56, in <module>
    maxnofile[1]))
ValueError: current limit exceeds maximum limit

已安装的应用程序:

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',

    # 3rd Party Modules
    'corsheaders',
    'crispy_forms',
    'rest_framework',
    'wkhtmltopdf',
    'autocomplete_light',
    'whoosh',
    'haystack',
    'threadedcomments',
    'django_comments',
    'pytz',
)


推荐答案

我相信你做了

pip install haystack

但是,您应该使用django-haystack,所以

However, you should use django-haystack, so do

pip uninstall haysatck

pip install django-haystack

这篇关于Django:ValueError:当前限制超过最大限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆