Worked out a failure when running on the command line.  Behavior in Pycharm was different.  Should run in both.