Using Pycharm with h2o objects causing console to keep printing objects

Completed

I am working in PyCharm for the first time today, and really enjoy it so far. One issue I have run into is with the Python Console. I am using the h2o package, and when I create a new h2o object like an H2OFrame, it causes that object to keep printing in the Python Console anytime I run any piece of code. 

I can even go to the console, and just press enter to run an empty line of code, and then it will print a preview of my H2OFrame in the console. Why does this keep happening? Is there some option in PyCharm that would cause it to remember the output from a previous object and continually print it to the Python Console every time I run a command?

7 comments
Comment actions Permalink

I am also experiencing this issue, perhaps anyone from jetbrains could assist. @Natethomp did you manage to find a solution to the problem?

4
Comment actions Permalink

I am having exactly the same issue, please could somebody help us

 

3
Comment actions Permalink

@Hein, @Kyle. Yes, there is a semi-solution. I opened up a ticket with Jetbrains, https://youtrack.jetbrains.com/issue/PY-30628, and the result was that this is mostly caused by how h2o and pycharm interact with each other. Pycharm calls repr() on each object that has been created in the 'variables' section when any thing is ran, and h2o objects have written into them to print when repr() is called. At least this is my understanding of whats going on. 

The "fix" is to uncheck 'Show Variables' on the left side of the python console. This does prevent the issue, but then you cant see your variables either if you want to view your objects. 

They did state that in v2018.2 they are adding an option that should address this issue. Hope this helps!

2
Comment actions Permalink

I'm having same issue. Debug console is printing h2o objects.

0
Comment actions Permalink

Hi All,

I'm facing the same issue any updates about that?

Setup: Ubuntu 18.04

          Pycharm 2019.2 professional edition 

          Python 3.6.8

 

BR

0
Comment actions Permalink

Aviv, the solution was found on the ticket referenced above, this option is now available in the current release:

Elizaveta Shashkova commented 3 Jul 2018 11:45
@... Since PyCharm 2018.2 (which will be released soon) you can try an option "Load variables on demand", it might help in your case. You can go to Python Console tool window | Settings (gear icon) | Variables Loading Policy | On demand.
0
Comment actions Permalink

Unfortunately, still not working (

0

Please sign in to leave a comment.