title: PyCharm Run --- why does it sometimes display a traceback and error and sometimes not?
body: <p>I've noticed that if I run the exact same piece of Python 3 code in PyCharm, the "Run" tab sometimes will show the full traceback and error message, but other times will only show "Process finished with exit code 1".  </p>
  
  <p>1) Can someone explain why this happens?</p>
  
  <p>2) Is there some way to force PyCharm to always show the full traceback and error message?</p>
  
  <p>Edit:  Here is an example that shows the behavior that I've been seeing.  When I ran this 20 times, I got the traceback and error twice and the "exit code 1" message by itself 18 times.   In order to see this behavior, the code seems to need to be busy printing something before the exception is raised.  If I only raise the exception (without the calling callme()) I always get the traceback and error.</p>
  
  <pre><code>#!/usr/bin/python3
  
  def callme():
      print('doing some stuff!')
  
  def main():
      for i in range(1,100):
          callme()
      raise Exception('Something is went wrong!')
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>Edit 2:  I just realized that the answer to this probably has to be.  The PyCharm Run display window only shows a certain number of lines.  If the number of lines that it can print is less than the amount of stuff I am printing, then some of the lines won't show.  So, actually the traceback lines are still there, but they just got printed way before some of the other output and so they aren't visible in the window.  I found out that I can actually jump up to them (even if they aren't visible) by pressing the little up button next to the Run window.    </p>
  
  <p>Edit 3:  Looks like I'm not the only person who has had this problem:
  <a href="https://stackoverflow.com/questions/28014357/pycharm-output-error-messages-interspersed-with-console-output-how-to-fix-this">PyCharm output error messages interspersed with console output. How to fix this?</a></p>
  
  <p>According to that question, it got reported as a bug (<a href="https://youtrack.jetbrains.com/issue/PY-16143" rel="nofollow noreferrer">https://youtrack.jetbrains.com/issue/PY-16143</a>), but (as far as I can tell) it wasn't repaired.   Any ideas on how to get around this?     </p>
  
  <p>For those who asked: I'm using PyCharm Community Edition 2016.3.2 and my operating system is CentOS 6.6. </p>