I have encountered some syntax errors while loading footprint “pretty” files in the schematic CvpcbAssign Footprint function. The errors are in the file URL string and I cannot find where and how to correct them. There error messages are below:
Errors were encountered loading footprints:
* Footprint library 'C:\Program Files\KiCad\6.0\share\kicad\footprints\/Capacitor_SMD.pretty' not found.
* Footprint library 'C:\Program Files\KiCad\6.0\share\kicad\footprints\/Connector_Multicomp.pretty' not found.
* Footprint library 'C:\Program Files\KiCad\6.0\share\kicad\footprints
' not found.
As you can see, all three errors have syntax errors of “/” preceding the “.pretty” filename. There is a forward slash inserted just after the backslash [/Resistor_SMD.pretty]. I need to edit these three URLs but cannot find where they are located in the KiCAD 6 file structure.
Can anyone point to the file storing these set URL strings?
But the other valid library entries would also be of the same form so the spurious slash may not be the problem. The last entry seems to have an extra linefeed within the string. I wonder if the library table file is corrupted. Do you have personal libraries in the table? If not you could do a reset by renaming the library table file, and KiCad will recreate it.
I was hoping that these URLs might be stored somewhere in an ASCII text file somewhere like othe KiCAD items. You indicate that these addresses might be inaccessible to the user, resulting in the need to rebuild these files. I had used KiCAD V5.99 last year and generated some footprints. I installed KiCAD6 a month ago to start a new project. My personal footprints from v5.99 are probably mixed in with the new v6 libs. Maybe a complete backup and a careful reinstall of v6 would help.
No, don’t reinstall. There’s nothing wrong with the software package, only your personal configuration. The file you want is fp-lib-table and can be found from the documentation link posted here: A list of methods for deleting config files - #3 by gkeeth The common part is actually the expansion of the environment variable KICAD6_FOOTPRINT_DIR, which is hardwired for the platform and build.
I suspect fp-lib-table is corrupted. If you can find a good backup for that, restore it. Otherwise move it aside and KiCad will recreate it, but without your personal entries.
$KICAD6_FOOTPRINT_DIR isn’t actually hardwired; there’s a default for each platform/package but it can be overwritten, and it’s stored in the kicad_common.json file in the user configuration directory.
As I wrote, it’s compiled in by the packager, as one would expect because it differs between platforms. It does not appear in kicad_common.json if it’s not overridden, e.g. in my config.
I agree with you, my point was just that the variable can be changed. OP could check what it’s set to by looking at its value in Preferences → Configure paths, but it looks like it’s set appropriately based on the error. The default is this:
I also checked the fp-lib-table file that ships with the libraries (the one that’s recommended to be picked as your library table when you first set up kicad). It has:
Interestingly Connector_Multicomp.pretty was removed between 6.0.1 and 6.0.2 (it had been deprecated and empty for a long time).
Clearly something is wrong with the third library in the error message
To OP’s point, I don’t think the forward slash is the problem. The forward slash comes from the default library table file and doesn’t cause any problems for me on Windows:
I suspect it’s a mix of what @retiredfeline has suggested (corrupt library table, based on the empty library name) and possibly some missing libraries. The Capacitor_SMD.pretty library should be there; @d3w can you check if there’s a Capacitor_SMD.pretty folder in your C:\Program Files\KiCad\6.0\share\kicad\footprints\?
Yes, there are the two files “Capacitor_SMD.pretty” and a “Resistor_SMD.pretty”. Interesting though is that CvpcbAssign Footprint function is looking for the plural of these two files (“Capacitors_SMD.pretty” and a “Resistors_SMD.pretty”) also.
Ah, then you have an old footprint library table hanging around from v4. During the v4 → v5 update, many libraries were renamed and the plural → singular change is a telltale one.
You should do what @retiredfeline suggests and prod KiCad to make you a fresh footprint library table.
close kicad
Make a backup of your existing footprint library table by copying %APPDATA%\kicad\6.0\fp-lib-table to a safe place
relaunch KiCad and open the pcb editor.
KiCad will prompt you to set up the footprint library table. Choose the default option: Copy default global footprint library table (recommended)
You should now have a working library table setup, but you’ll need to add any personal libraries you had before by hand. You can do this from the Preferences → Manage Footprint Libraries dialog (use the little folder button at the bottom and browse to the library. You can use your backup fp-lib-table as a reference if that’s helpful.
Thanks gkeeth and retiredfeline,
Will try these this morning. This problem does not impact using both the schematic and PCB layouts if one is not using the parts that the error message is complaining about. I tried loading some of the demo projects and the same error occurs with these. Maybe it’s my OCD as it doesn’t stop progress. More on this later.