<h3 dir="auto">What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?</h3>
<p dir="auto"><a href="http://stackoverflow.com/questions/24829769/module-object-has-no-attribute-main-django" rel="nofollow">Similar errors identified as name conflicts between module and directory</a></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System:  macOS Sierra</p>
<p dir="auto">If installed from binary pip package, provide:</p>
<ol dir="auto">
<li>A link to the pip package you installed:<br>
current osx <a href="https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-0.11.0rc0-py2-none-any.whl" rel="nofollow">nightly</a></li>
<li>The output from <code class="notranslate">python -c "import tensorflow; print(tensorflow.__version__)"</code>.<br>
0.11.0rc0</li>
</ol>
<h3 dir="auto">If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)</h3>
<p dir="auto">In terminal window run 'tensorboard'</p>
<p dir="auto">Output:</p>
<blockquote>
<p dir="auto">File "/tensorflow/lib/python2.7/site-packages/tensorflow/tensorboard/tensorboard.py", line 43, in main<br>
logdir = os.path.expanduser(FLAGS.logdir)<br>
AttributeError: 'NoneType' object has no attribute 'logdir'</p>
</blockquote>
<h3 dir="auto">What other attempted solutions have you tried?</h3>
<p dir="auto">A workaround is to rename tensorboard.py (I used tensorboard1.py) and execute with full path to that file.</p>
<p dir="auto">Originally I printed <code class="notranslate">__name__</code>  and learned it was 'tensorflow.tensorboard.tensorboard'.</p>
<p dir="auto">Running tensorboard results in this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    logdir = os.path.expanduser(FLAGS.logdir)
AttributeError: 'NoneType' object has no attribute 'logdir'"><pre class="notranslate"><code class="notranslate">    logdir = os.path.expanduser(FLAGS.logdir)
AttributeError: 'NoneType' object has no attribute 'logdir'
</code></pre></div>
<p dir="auto">Best practice in this case is arg(opt)parse.</p>