2015-11-03 53 views
1

我在我的Django應用程序中獲得ValueError: current limit exceeds maximum limit。如果我從安裝應用程序中刪除乾草堆,它會消失。我曾嘗試升級乾草堆,降級乾草堆,刪除與乾草堆相關的所有代碼,但仍然是一個問題。Django:ValueError:電流限制超過最大限制

完全回溯:

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', 
) 
+0

您使用什麼數據庫配置? – Ward

+0

'數據庫= { '缺省':{ '發動機': 'django.db.backends.sqlite3', 'NAME':os.path.join(BASE_DIR, 'db.sqlite3'), } } ' – Mantis

+0

你在Mac OS上運行嗎? – solarissmoke

回答

5

我相信你這樣做

pip install haystack

但是,你應該使用Django的草垛,所以做

pip uninstall haysatck

pip install django-haystack