Python 运行django本地服务器时出错:`uuuu init_uuuuu()获取了意外的关键字参数';tcp#u nodelay'`

Python 运行django本地服务器时出错:`uuuu init_uuuuu()获取了意外的关键字参数';tcp#u nodelay'`,python,django,Python,Django,一切都很好,总是毫无问题地运行。现在我从浏览器加载应用程序时出现错误。似乎与代码无关,因为我跳到了最旧的分支上,并且得到了相同的错误。这里是我的python和django版本 $ python --version Python 3.6.0 $ python -c "import django; print(django.VERSION)" (1, 11, 5, 'final', 0) 这里是我尝试加载127.0.0.1:8000 url时出现的错误 Traceback: File "/Use

一切都很好,总是毫无问题地运行。现在我从浏览器加载应用程序时出现错误。似乎与代码无关,因为我跳到了最旧的分支上,并且得到了相同的错误。这里是我的python和django版本

$ python --version
Python 3.6.0
$ python -c "import django; print(django.VERSION)"
(1, 11, 5, 'final', 0)
这里是我尝试加载127.0.0.1:8000 url时出现的错误

Traceback:

File "/Users/karim/Envs/ec/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/Users/karim/Envs/ec/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  244.             response = middleware_method(request)

File "/Users/karim/Envs/ec/lib/python3.6/site-packages/django/middleware/cache.py" in process_request
  133.         cache_key = get_cache_key(request, self.key_prefix, 'GET', cache=self.cache)

File "/Users/karim/Envs/ec/lib/python3.6/site-packages/django/utils/cache.py" in get_cache_key
  362.     headerlist = cache.get(cache_key)

File "/Users/karim/Envs/ec/lib/python3.6/site-packages/django/core/cache/backends/memcached.py" in get
  79.         val = self._cache.get(key)

File "/Users/karim/Envs/ec/lib/python3.6/site-packages/django/core/cache/backends/memcached.py" in _cache
  172.             self._client = self._lib.Client(self._servers, **client_kwargs)

Exception Type: TypeError at /
Exception Value: __init__() got an unexpected keyword argument 'tcp_nodelay'

有什么建议可以解决这个棘手的问题吗?谢谢

我也有同样的错误,在我的情况下,这是一个与settings.py文件中的缓存设置相关的问题,请检查您的缓存设置的选项键中是否有类似的内容

CACHES = {
'default': {
    'BACKEND': '-----',
    'TIMEOUT': 30000,
    'KEY_PREFIX': CACHE_MIDDLEWARE_KEY_PREFIX,
    'OPTIONS': {'ketama': True, 'tcp_nodelay': True}

我删除了选项,它对我有效

您是否清除了浏览器的缓存并重试?@bestast谢谢。我试过了,但没有改变:-(