python logging module AttributeError: 'str' object has no attribute 'write'
<p>I am using tornado,and in its app,I import logging just want to log some info about server.
I put this:</p>

<pre><code>logging.config.dictConfig(web_LOGGING)
</code></pre>

<p>right before:</p>

<pre><code> tornado.options.parse_command_line()
</code></pre>

<p>but when I run the server,when I click any link,I get error:</p>

<pre><code>Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 874, in emit
    stream.write(fs % msg)
AttributeError: 'str' object has no attribute 'write'
Logged from file web.py, line 1946
</code></pre>

<p>it just repeats when i click into any link.
what is the real problem?</p>

<p>I've already changed any file,directory to others to steer clear of namespace conflict...</p>

<p>Psychic debugging says <code>web_LOGGING</code> has a key named <code>stream</code> with a <code>str</code> value (probably a file path); <a href="https://docs.python.org/3/library/logging.html#logging.basicConfig" rel="nofollow"><code>stream</code> is only for already opened files, if you want to pass a file path, it's passed as <code>filename</code></a>.</p>

python logging tornado