Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pycharm debug console unreadable because of teamcity

Since a few days my pycharm debug console is systematically polluted by teamcity infos, e.g. when i want to print out a variable value, the following will be displayed:

>>> df
##teamcity[testStdOut timestamp='2017-11-02T15:55:00.670' flowId='test_pricing_36_weight_provider.TestPricing36WeightProvider.test_add_weights' locati...

Any hint how to deactivate this teamcity thing ?

like image 918
register Avatar asked Nov 02 '17 14:11

register


1 Answers

This is a PyCharm/IntelliJ bug.

PyCharm replaces stdout with its own object. They do a bunch of screwing around with objects that get printed, resulting in:

  • some object are not printed to the prompt
  • some programs cannot be run if they expect stdout to be a file object and not a StringIO.

This is a long standing bug with PyCharm - there's really no excuse for it in a piece of software with a $500/yr license fee. Being able to debug my program in my IDE out of the box is way up there in my list of requirements.

The work around they recommend is to set: JB_DISABLE_BUFFERING=1 ... which you can do for all unit tests.

See: no output in console for unittests in pycharm 2017

like image 185
user48956 Avatar answered Oct 20 '22 13:10

user48956