pycharm debug console unreadable because of teamcity

允我心安 提交于 2019-12-10 03:09:01

问题


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 ?


回答1:


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




回答2:


Any chance you've installed a teamcity test runner or debugger of some kind in your pip requirements? The ##teamcity bit is a service message used to report output to a TeamCity build log.

Check this for more info about TC service messages: https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity



来源:https://stackoverflow.com/questions/47078352/pycharm-debug-console-unreadable-because-of-teamcity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!