Error Loading Board

I recently started playing with KiCad. I created a very simple schematic using some sensors and then created a multi layer pcb. Everything appeared to work just fine. I even created a 3D view. I started and completed a different board which seems ok as well. Today I reloaded the first pcb and all of a sudden I get a load error. The error test is:

Error Loading Board.
PARSE_ERROR: Expecting “symbol” in input/source “myfilename”.kicad_pcb.
line 24
offset 8
from path,dsnlexer.cpp: Ecpecting(): line 361

any suggestions?


How did you load the board? It looks like “Import DSN” is reading your file, not the normal pcb parser.

KiCad Control Panel -> File->Open Project->Select “.pro” file

Click 3rd Icon from left Pcbnew - printed circuit board editor.

Error immediately pops up. Exactly same process for my 2nd schematic and layout works perfectly.


Either post the headers of both kicad_pcb files here… the first 30 lines will suffice or you check them out yourself side by side (with notepad++ for example) it seems the faulty file has got something at line 24 that ticks of the parser.

I managed to fix the problem. It seems that a couple of the Layer names listed in the first few lines

(0 F.Cu signal)
(1 +12V_Plane power hide)
(2 -12V_Plane power hide)
(31 B.Cu signal)
did not match the references used way later in the file. I have no idea how that could have happened since I had been working on the pcb, saving and reloading repeatably before this happened. If I changed something with the Layer descriptions then saved (which is possible), there should have been some kind of warning if what I did totally broke the file where it could not be loaded again. Anyway, it looks ok for now.



I just had the exact error happen to me. We’ll see if your solution can help.


It seems I won’t be to restore these because they are suddenly empty files showing zero bytes for file size.

I have a similar problem with loading my PCB file and here are a few details:

  1. My ubuntu 14 system crashed when I tried to install some new drivers.
  2. I was able to access the file system and get my kicad documents and a backup copy.
  3. I reinstalled everything and reloaded the kicad documents.
    When I opened up either the backup or the original, the schematic looked fine (at first glance), but the pcb editor popped up with the parse error listed in this post and one other. I examined the text file, but did not find any blatant oddities. What was exceptionally odd was that some components changed size and orientation. See the photo below. The diodes flipped direction and the resistors grew to the point where they were no longer connected.

Once one uses a component and a footprint in a schematic are they stored locally?
Could the new install have reloaded new component sizes?

Here are the first 63 lines of pcb file:

(kicad_pcb (version 4) (host pcbnew 4.0.4+e1-6308~48~ubuntu14.04.1-stable)

(links 265)
(no_connects 0)
(area 135.814999 35.484999 212.165001 117.550001)
(thickness 1.6)
(drawings 8)
(tracks 1408)
(zones 0)
(modules 105)
(nets 120)

(page A4)
(0 F.Cu signal)
(1 In1.Cu power)
(2 In2.Cu power)
(31 B.Cu signal)
(33 F.Adhes user hide)
(35 F.Paste user hide)
(37 F.SilkS user)
(39 F.Mask user hide)
(40 Dwgs.User user hide)
(41 Cmts.User user hide)
(42 Eco1.User user hide)
(43 Eco2.User user hide)
(44 Edge.Cuts user)
(45 Margin user hide)
(47 F.CrtYd user hide)
(49 F.Fab user)

(last_trace_width 0.25)
(trace_clearance 0.2)
(zone_clearance 0.508)
(zone_45_only no)
(trace_min 0.2)
(segment_width 0.2)
(edge_width 0.15)
(via_size 0.6)
(via_drill 0.4)
(via_min_size 0.4)
(via_min_drill 0.3)
(uvia_size 0.3)
(uvia_drill 0.1)
(uvias_allowed no)
(uvia_min_size 0.2)
(uvia_min_drill 0.1)
(pcb_text_width 0.3)
(pcb_text_size 1.5 1.5)
(mod_edge_width 0.15)
(mod_text_size 1 1)
(mod_text_width 0.15)
(pad_size 1.524 1.524)
(pad_drill 0.762)
(pad_to_mask_clearance 0.2)
(aux_axis_origin 0 0)
(visible_elements FFFFF309)
(layerselection 0x00030_80000001)

And here was the error-
Error loading board.
PARSE_ERROR: Expecting ‘number’ in input/source “/home/mud/src/stairs/aStair.kicad_pcb”, line 63, offset 23
from /build/buildd/kicad-0.20131208+bzr4024/common/dsnlexer.cpp : Expecting() : line 285

Guidance appreciated. Will try the backups, but since both of my copies show similar issues, I tend to think that this is an issue with reloading the software/libraries.

I remember that a year or so ago KiCad diode symbols were revised to make pin 1 the cathode, to conform to IPC standards

I got this at that position (for a couple of files I haven’t plotted yet, might pay to ‘reset’ it that way?):

(layerselection 0x00030_ffffffff)

So, I think that I fixed the problem, but I do not exactly know what was wrong. In my haste to reinstall my system, I simply used sudo apt-get install kicad without first adding the new repository. It is likely that this grabbed an old version of kicad as the display changed colors on me in addition to the part size and orientation changes. Reinstalling fixed everything.

The Ubuntu KiCad packages range from 4.0.2 for Xenial all the way back to a 2011 build for Precise
You need the PPA v4 stable repository

My solution was pretty easy.
I looked the .kicad_pcb file with notepad++ and I saw that it is filled with a bunch of ‘null’(it litterally means there is nothing).

In the same folder I found a file with the extension .kicad_pcb-bak.
So I decided to rename the .kicad_pcb-bak to .kicad_pcb and replace the old file. It worked