Pycharm - Cannot Find Declaration To Go To
Solution 1:
Right click on the folders where you believe relevant code is located ->Mark Directory as-> Sources Root
Note that the menu's wording "Sources Root" is misleading: the indexing process is not recursive. You need to mark all the relevant folders.
Solution 2:
What worked for me was right-click on the folder that has the manage.py
> Mark Directory as > Source Root.
Solution 3:
I had a case where the method was implemented in a base class and Pycharm couldn't find it.
I solved it by importing the base class into the module I was having trouble with.
Solution 4:
The solution for me: remember to add an interpreter to the project, it usually says in the bottom right corner if one is set up or not. Just an alternate solution than the others.
This happened after reinstalling PyCharm and not fully setting up the ide.
Post a Comment for "Pycharm - Cannot Find Declaration To Go To"