Error Message: Error occured creating symbol library

Quick, question, without many words:
How can I fix the following error?

Version:

Did you create that project or was it downloaded from somewhere? If you created it: which version did you use to create it?


Generally the error message indicates that the cache library is not found. That library is to be considered part of the project (never delete it, if you share your project make sure this file is included)
This would not be a problem if you would have the symbol library that holds the symbol in question active in KiCad. So if you downloaded the project from somewhere check if that project includes libraries. If it does add these libs to KiCad.


Sharing the version info is best done as text via the copy version info button. (This includes more information than the screenshot)

Or is it possible that you tried renaming your project? (The cache lib name of the error message does not fit the current project name)

I got one schematic from another student, and added it to Kicad.
He changed only that one schematic file i got directly from him by mail.

EDIT: Just verified, there are no ‘missing symbol’-Symbols. I mean those with a question mark.

Version Information:

Application: Eeschema
Version: (5.1.5)-3, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.66.0 OpenSSL/1.1.1d (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.1.1) nghttp2/1.39.2
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.71.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.66.0
Compiler: GCC 9.2.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

Save the schematic, close it and open again. Is there still no problem? Does the same error message still come up?


The error message you show looks like the student had that schematic file in a project that was named differently than yours. My guess is you sent them just that one file to edit, and they opened it with kicad (which automatically makes a new project named like the schematic file)


So how to avoid getting in trouble when working together on a project. Well for a start don’t send single files per mail around. The schematic consists of all .sch files and the -cache.lib file. These plus the library table and the .pro file should always be handled together.

I suggest you either use a cloud service or better yet a version control system when multiple people work on the same project at the same time (if the working together happens at different times then sending the full project directory back and forth is also a viable option)
Make sure everyone has the same KiCad version and the same setup for global libraries

If you work with students that often change then a good option is to setup KiCad in a virtual machine and share that machine with your students. This allows them to skip any administrative tasks and dive straight into working on the project


What is the cache library?
In KiCad symbols are not embedded in the schematic files (will come with v6) which means the information about symbols must be stored somewhere. This is where the cache library comes in. It holds the symbol information about every symbol used in the project.

So if something changes in the libraries than the original symbol is still available in the cache and can be used to “rescue” the project.

The issue comes only up when saving.
EDIT: To make it very clear (as i am not a native speaker): Not when opening, not when closing, only when saving.

Actually not, he took the hole project from git. As git merge with kicad caused last time to break the hole project. we tryed this time only replacing the specific file.

We tryed to use git, but it breaks the hole projekt when merging. I can give you privately a zip file of that crashed project, however, i do not want it to upload here. If you wish so, send me your email.

Is there any tutorial showing how to setup kicad? Git out-of-the-box with multiple people does unfortuatelly not work out-of-the-box.

The current project has no “questionmarks”, so kicad should know all symbols. But when saving the error message pops up.

The message pops up on saving? That is indeed strange.

Can you share the local library table (sym-lib-table)
Also make a screenshot of the files in the project directory (so that we see which files exist)

Also a screenshot of tools->edit symbol library references could be useful (make sure the line corresponding to the symbol given in the error message is visible in the screenshot.)

I am not really prepared to help in private but there is KiPro just for that usecase: https://www.kipro-pcb.com/

If merging breaks the project then sending mails and exchanging files will do the same.
You can use a centralized version control tool that supports locking of files to do what you need. Example SVN.

This will ensure that only one person works on it at a particular time instance (while they have the lock). This avoids the need for locking and multiple people can still work on different aspects of the same project. (It does the same as sending mails just takes care of some things automatically)

Not necessarily. KiCad is telling you when it saves it does not know the symbols. I would trust KiCad on that point.

I have had the same error, it was indeed because the symbol was not known to KiCad (a bad path in symbol library table). I suspect that when saving, KiCad tries to regenerate the cache file from the libraries, but maybe it clears the cache first. So it all looks ok when you open (no ??), but only when you save KiCad goes “oop didn’t find that symbol after all”. Probably this behaviour has changed from earlier versions.

A workaround is to copy the cache file, and add it to the project symbol library table.

Just adding the cache lib does not solve the problem as the library nickname is included in the symbol references. Use the rescue dialog as it takes care of reconnecting the symbols correctly.

However the error message indicates that the symbol is not even found in the cache lib which means something is severely wrong.

Hmm, I am sure you are right, so I must be mistaken about that. Probably it is something I tried which didn’t work before finding what did.

I think it should be easy to reproduce the symptom, by deleting a symbol that is used by the schematic.

Then the rescue dialog should come up next time one opens the schematic (no message when closing). The strange thing is the error message looks like kicad expects the source library to be a cache lib so this might be the reason for the problem. (Which is why i requested the sym lib table and the screenshots above)

The student opened the whole project, commited everything, and then the dialog comes up, resucing the footprints. I guess KiCad look to the individual schematics. So changing indivdual schematics is not an option.

Still the question remains, why a git merge breaks a hole project. If someone wants to see a broken merge project i can provide one by mail. Is there any tutorial to tell git, to treat text files as binaries? Then, i guess the problem would be solved.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.