Can't load Custom.pretty, incorrect path

Like the title says, whenever KiCad tries to load my custom library, it fails. The problem seems to stem from the fact that I moved the project folder. I moved all the KiCad files into a new subdirectory of the main project folder, and the path that it is looking for the library in didn’t change. the path to the library used to be ‘/home/aaron/Documents/Projects/MIDI Controller/Custom.pretty’, but now it’s ‘/home/aaron/Documents/Projects/MIDI Controller/PCB/Custom.pretty’ I get the following error message any time I try to open any footprint browser. This includes CVpcb, the Pcbnew footprint library, and the footprint editor.

Errors were encountered loading footprints:

IO_ERROR: footprint library path ‘/home/aaron/Documents/Projects/MIDI Controller/Custom.pretty’ does not exist from kicad_plugin.cpp : FootprintEnumerate() : line 1798

I’ve looked through all the files to see if I could find a hard-coded path to the custom library, but nothing jumped out at me. Any suggestions as to how to point Kicad to the correct location?

I suppose I should have done a bit more work before posting here. I’m still not completely familiar with the “new” Kicad. I found the path hard coded in the Library Manager. It seems a bit odd that it’s not a relative path by default, as there’s an environment variable at the bottom of the window that is the path to the project folder.

I think those paths get saved in the Project file (" *.pro").

Let’s see if I can remember the pragmatic solution to this problem. As best I recall:

  • PCBNew will open, even if the library path isn’t found.
  • Using “Preferences” > “Footprint Libraries Mangler”, select the offending library and remove it with the “Remove Library” button.
  • Using “Preferences” > “Footprint Libraries Wizard”, add the custom library back into the library list.
  • In the main KiCAD Project window, click the “Save Current Project” icon. (There isn’t any option for this in the drop-down menus.)

Dale

p.s. - You may have to re-run CvPCB, or re-import the netlist, to get the footprints you want.

Changing the library path in the Pcbnew footprint library manager fix everything. It just strikes me as odd that it stores an absolute path, and not one relative to the .pro file.

Moving or copying a project with local libraries requires a little effort modifying paths.
This happens to me a lot when I take a snapshot and start a new iteration of a complex PCB

It is very common to modify an existing PCB. This typically happens several times during a product development cycle. Even a mature, released, design may require a modified PCB to improve manufacturing yield, or to change components after a part’s obsolescence.

It seems obvious that a feature such as “Clone this project into a new directory” would be useful. Giving the user an option to also clone any libraries from the existing project directory to the new directory (and change paths accordingly), or retain library table references to the old libraries, would make the feature especially useful.

Dale

1 Like