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?

5 comments

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

4

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

 

3

@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!

0

I am having a problem getting PyCharm to recognize H2O. It says it is not being referenced despite uninstalling and re-installing. I am on Linux CentOS as well. Any ideas?

-1

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

0

Please sign in to leave a comment.