Pycharm freezes when dereferencing attributes

Answered

 Hi, when inside a debug session, Pycharm freezes when I use the dot (.) operator to dereference an attribute. This behaviour is consistent across environments (various flavours of Linux on different architecture, Windows). In particular, The freezes are of a significant period of time - can be up to several minutes.

In particular, I work with pandas dataframes often which is where the freezes have been observed. For example, if df is a pandas.DataFrame object, the following will freeze the debug session for a while:

df.columns

The freeze happens after typing "df.c". It will then happen again if I continue typing "df.co" and again if I were to delete "o" and go to "df.o". Needless to say, this makes working with Pycharm and pandas sluggish. I am not sure why the freeze happens, perhaps Pycharm tries to come up with a dropdown menu of attributes (which it never shows even after the freeze). Most of the time, I don't care about a dropdown of what attributes are available, I know what attribute I want to dereference but it seems I have to wait for this search to occur. This has been around for a while now (years).

 

My current machine is:

CPU: i7-6700 @ 3.4GHz

RAM: 64GB

OS: Win7

3 comments
Comment actions Permalink

Hi,

I tried it on my side and seems to be just fine. Could you please share a sample code, or provide a screencast showing it? If you would like to keep it private, please create an issue in our issue tracker using the link and attach it there as well as idea.log (Help | Show Log in...) with visibility set to jetbrains-team.

0
Comment actions Permalink

Hi Sergey,

 

Sorry, I should have provided minimal steps to reproduce. I seem to be able to reproduce it with this snippet:

import pandas as pd
import numpy as np
np.random.seed(0)

df = pd.DataFrame(np.random.rand(100,10))
pass

Please put a breakpoint on 'pass' and then right-click and select "Debug". When the breakpoint is hit, enable the debug console, do not use "Evaluate Expression" (Alt+F8). In the console window/prompt (which should look similar to an ipython terminal window and prompt) typing "df.columns" results in a freeze of a few minutes.

To enable console, in settings, go to "Build, Execution, Deployment" -> "Console" and tick "Always show debug console". 

 This also happens in IntelliJ IDEA with the python plugin.

0
Comment actions Permalink

Thank you!

Works just fine for me.

Please try starting with defaults (without custom plugins) by renaming/removing configuration and plugins folders (https://intellij-support.jetbrains.com/hc/en-us/articles/206544519). If doesn't help, please upload your logs folder zipped (Help | Compress Logs and Show in...) after reproducing the problem to https://uploads.services.jetbrains.com/ and let me know the name of that zip file.

0

Please sign in to leave a comment.