When deleting a source folder in a PyDev project in the Project Explorer, the project PYTHONPATH is not updated and there is a red x marking in the outline with an error message saying "Source folder: [source folder name] not found".
Is this really the intended behavior? I would expect the PYTHONPATH to be updated if source folders are removed.
I'm using PyDev version 2.7.3 and Eclipse 3.7.2.
Steps to repeat the problem:
Note: When repeating the steps above in the Package Explorer instead of the Project Explorer, the red x's don't show up - so you can't see there is a problem. However, if you look in PyDev properties the behavior is the same - PYTHONPATH is not updated.
Right click on your project folder->Properties->PyDev - PYTHONPATH. Select the directories causing the errors and click Remove on the right.
Looks like the problem happens when project name doesn't match directory name.
e.g.,
source folder not found
env/VersionModifier/src/myfile.py
You could call it a bug or an "enforcement of best practice" but right clicking on the project and making its name match its enclosing directory fixed the problem for me in Kepler.
Good luck
Peter
the way i resolved it is to go to the folder in which your code is stored and find a file by the name of .pydevproject
. It is an invisible file in eclipse/aptana so you may have to do this through cli or file browser. look for a structure that look like <path>path/to/your/file</path>
and delete the ones that show errors in your package explorer. this will resolve your problems for now, but this is a bug and needs to be reported.
I think the problem stems from the fact that pydev fails to remove the <path>...</path> vars once the user deletes the source folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With