title: Don't understand why debugging a script in VS Code is causing an AttributeError
body: <p>I'm new to python, been learning it for the past few weeks. I recently started getting the following error when debugging a Python script in VS Code:</p>
  
  <pre><code>Exception has occurred: AttributeError
  'NoneType' object has no attribute 'write'
    File "C:\SW-Languages\__LEARNING\Learning Python\Ex_Files_Learning_Python\Exercise Files\Ch3\itertoolsPermutations.py", line 8, in &lt;module&gt;
      print("Hello")
  </code></pre>
  
  <p>Here is the code (originally was more, but isolated it to this simple 1 line program:</p>
  
  <pre><code>print("Hello")
  </code></pre>
  
  <p>I installed VS Code from Anaconda, everything worked fine for the first couple of weeks, then I made an updates to anaconda (I don't recall details) and also installed new Python packages when the error first occurred.</p>
  
  <p>The "Hello" script works fine when executed from a command shell (as do all my other python scripts, but basically I can only use VS Code for editing, none of my scripts will run in VS Code now, I have to execute them via a cmd shell.</p>
  
  <p>Additional info:</p>
  
  <p>from cmd shell:</p>
  
  <pre><code>C:\Users\jd400&gt;python -VV
  
  Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)]
  </code></pre>
  
  <p>from VS Code terminal:</p>
  
  <pre><code>(base) PS C:\SW-Languages\__LEARNING\wxFormBuilder\wx-Widget-Examples\sc&gt; python -VV
  
  Python 3.7.2 (default, Feb 21 2019, 16:05:07) [MSC v.1915 64 bit (AMD64)]
  </code></pre>
  
  <p>I have researched the following related posts on stackoverflow, but they were no help:</p>
  
  <p><a href="https://stackoverflow.com/questions/17139658/how-do-i-resolve-nonetype-object-has-no-attribute-write-error-with-scikit-le">How do I resolve &#39;NoneType&#39; object has no attribute &#39;write&#39; error with scikit-learn digits dataset?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/17595337/attributeerror-nonetype-object-has-no-attribute-write">AttributeError: &#39;NoneType&#39; object has no attribute &#39;write&#39;</a></p>
  
  <p><a href="https://stackoverflow.com/questions/8949252/dont-understand-what-this-attributeerror-means">Don&#39;t understand what this AttributeError means</a></p>