"Find Usages" & "Refactor -> Rename" don't find occurrences

Hello,

I've been using PyCharm for quite some time now (under Mac OS X and Linux), and I've noticed that these features, which I once used with no problems, don't seem to be working for me anymore.

If I try to "Find Usages" or rename a certain class method, for instance, the "Find" window will report no hits (and I seem to be specifying everything correctly: project scope, etc.). If, however, I do a simple "Find" at the project level, PyCharm will correctly bring me all occurrences.

Is this a known issue? Something I might have misconfigured at some point? I'm using PyCharm 1.5.3, with Django projects. Right now, with Ubuntu 10.10.

Thanks in advance,

Rubens

5 comments
Comment actions Permalink

Hi Rubens,

Find usages and rename refactoring for methods and classes should work in PyCharm 1.5.3. Please report the issue you've discovered to our bug tracker. A small reproducible example would be very helpful.

0
Comment actions Permalink

Thanks, Andrey - I guess I'll test this in my other computers/O.S.'s before submitting as a bug. I'm currently working with the Linux version only, might be something specific.

Regards,

Rubens

0
Comment actions Permalink

I had a similar problem with "Find all Usages". I don't know if it's the same problem you're having :-) but here are the details, in case it helps.

First, I was working on a Django project, under Windows XP, latest PyCharm (1.5.3). I had a project, call it D:\mysite.

After extensive research and testing :*(, I finally realized that the problem was because I had D:\mysite in my PYTHONPATH variable. This caused it to be added to the External Libraries list (in the Projects tab, below the active project).

The fix was to go to File->Settings->Python Interpreters->Paths for Selected Interpreter, and remove D:\mysite, then restart PyCharm. After that, the project directory was not listed in the External Libraries, and, interestingly, Paths for Selected Interpreter showed it as removed by user. :-)

"Find all Usages" worked fine after that.

You might also need to do File->Invalidate Cache and restart, not sure.

John C>

0
Comment actions Permalink

Hi John,

Thanks for chiming in!

But it doesn't seem to be my case - I didn't have the project dir in PYTHONPATH, nor did it appear under the External Libraries... I did check that it works on my Mac, though! So it seems it's a Linux thing, whatever it is. I'll have both my notebooks together next week, so I'll be able to do an exact test and see what happens...

Regards,

Rubens

0
Comment actions Permalink

I have this problem on a Mac. It works in another project. Could this be because my PyCharm directory is separate from my actual code? In this case it would be a bug.

My project directory is not included in the Python path.

It does give me proper suggestions for missing imports though.

0

Please sign in to leave a comment.