2👍
✅
Gunicorn, for reasons I don’t understand yet, adds the virtualenv/bin directory to the sys.path. Markdown installs a markdown.py into that bin directory. That markdown.py tries to import COMMAND_LINE_LOGGING_LEVEL from markdown the library. This results in a circular failure.
I don’t know why Gunicorn does this, and probably it shouldn’t. My convenience fix is to add the following to the server’s local_settings.py
import sys
for i, path in enumerate(sys.path):
if path.endswith('bin'):
del sys.path[i]
2👍
I fixed this error by removing the .py extension from markdown.py in whatever/bin. This apparently prevented it from importing itself instead of the markdown module in site-packages.
👤tkb
- [Django]-How do I use BeautifulSoup to search for elements that occur before another element?
- [Django]-Cannot assign must be a instance Django
- [Django]-Missing staticfiles manifest entry in Django deployment using Heroku
- [Django]-Create a git repo for project skeleton
- [Django]-Is it possible to retrieve 'id' field of objects deleted in Django .delete()?
Source:stackexchange.com