简体   繁体   English

遇到502重新安装django-haystack

[英]Encountering 502 re-installing django-haystack

I had previously successfully installed and tested out django-haystack, thought it wasn't what I wanted, and uninstalled it*. 我以前已经成功安装并测试了django-haystack,认为这不是我想要的,然后将其卸载*。 Now, I'm having trouble re-installing haystack. 现在,我在重新安装干草堆时遇到了麻烦。 It's like a messy breakup/reconciliation situation. 这就像混乱的分手/和解情况。

In particular, adding ANY haystack settings OR 'haystack', to INSTALLED_APPS in my settings.py file drastically breaks everything and I end up with a 502 response via Cloudflare, and Gunicorn telling me: 特别是,在我的settings.py文件中的INSTALLED_APPS中添加任何干草堆设置或'haystack',彻底破坏所有内容,最终我通过Cloudflare收到502响应,而Gunicorn告诉我:

raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

Here's what I've tried so far: 到目前为止,这是我尝试过的方法:

  1. Forcing a re-install of django-haystack (thinking I might have uninstalled it incorrectly), 强制重新安装 django-haystack(以为我可能没有正确卸载它),
  2. Uninstalling django-silk , which I installed after removing django-haystack (thought it could be a case of 3rd party apps interfering with each other...), 卸载我在删除django-haystack之后安装的django-silk (这可能是第三方应用相互干扰的情况...),
  3. Installing and running django-watson , and after finding out that it's not fast enough for my needs, uninstalling it (this one is just anecdotal I guess). 安装并运行django-watson ,并发现它不够快,无法满足我的需求,然后将其卸载(我猜这只是轶事)。

Any ideas? 有任何想法吗?


*Don't know if this information will be of any use, but here's what I did when uninstalling haystack the first time round: *不知道此信息是否有用,但这是我第一次卸载haystack时所做的事情:

  • pip uninstall django-haystack
  • Removed all haystack settings from settings.py 从settings.py中删除了所有干草堆设置
  • Removed 'haystack', from INSTALLED_APPS 已从INSTALLED_APPS删除'haystack',

Even more info: 更多信息:

$ pip show django-haystack 
---
Name: django-haystack
Version: 2.4.0
Location: .../lib/python2.7/site-packages # truncated path
Requires: Django


$ pip show Whoosh
---
Name: Whoosh
Version: 2.7.0
Location: .../lib/python2.7/site-packages # truncated path again
Requires: 

Figured it out after getting some sleep! 入睡后想通了! A spare ) in HAYSTACK_CONNECTIONS was the source of all my troubles..! HAYSTACK_CONNECTIONS中的一个备用)是我所有麻烦的根源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM