PyDev Error "Source not found" in projects with external contents

When you create a new PyDev project (Python project) in Eclipse, and the source content comes from another folder (not in the workplace), you must be uncheck the "Use default" in the creation wizard, ant put the path in the "Directory" folder.

In some case, after create the project, we get the error "Source folder: /XXX not found", where the XXX is the name of the container folder. The error is showed like this in the PyDev Package Explorer view:



And as you can see, the package structure of the project is not recognized (are displayed as simple folders).

To solve the problem, only you need to edit the hidden file .pydevproject created by Eclipse to store the project configuration (is visible in the Navigator view), and change the value of the tag <path>. The wrong value is:

    <path>/${PROJECT_DIR_NAME}</path>

You must be change to:

    <path>/real_name_of_the_project</path>

In my case:

    <path>/zoook-addons-trunk</path>

After save, the project looks like this:



Now the error in gone, and the package structure in the project are recognized by PyDev.


Comentarios

Entradas más populares de este blog

Mongotail 2.0 with new performance features, SSL and MongoDB 3.2 support

Logs Queries de MongoDB con Mongotail

Grails: Fixing timeout exceptions and hibernate AssertionFailure when execute a SQL query