Unable to import markdown due to COMMAND_LINE_LOGGING_LEVEL

I have a strange error in which I can import markdown in Python and I can import markdown in python inside the Django server, but when I try to import markdown inside the machine gun application server, I get the following.

* ImportError: cannot import name COMMAND_LINE_LOGGING_LEVEL

This is even more confusing because I found the only place where COMMAND_LINE_LOGGING_LEVEL refers to markdowns (or any of the code that I use) is the one line that defines it in the init .py method , and I commented on that. I am still getting this error.

Any ideas?

+3
source share
2

, , , virtualenv/bin sys.path. Markdown markdown.py bin. markdown.py COMMAND_LINE_LOGGING_LEVEL . .

, Gunicorn , , , . , local_settings.py :

import sys
for i, path in enumerate(sys.path):
    if path.endswith('bin'):
        del sys.path[i]
+2

, .py markdown.py /bin. , -, -.

+2

Source: https://habr.com/ru/post/1776771/


All Articles