Can't open boards designed with nightly in stable (5.1.4)

Hello!
Basically evertything is in the title.
Some more detail:
It reports this:
“Date of KiCad version required (or newer): 05/06/2019”

I guess there is no newer version than 5.1.4…
Anybody experienced the same problem?

It also says:
Unexpected “max_error” in input / source
<file_path>
line 52, offset 6

Looks like you created that project using nightly version. It is not backward compatible with 5.1 for some time.
You may have some luck if you just manually edit the file and remove the max_error tag with it’s value.

Hello!
Thanks for your reply.
Yes, tha’ts what I tried to do.It doesn’t help.,

Pascal

Show what is on that line and how you edited it. Also what is the error message after you edited it.
And make sure you remove max_error in the whole file, not just that one place.

Hello!

I just downgraded to the previous version I was using. But the problem will be
how to get my files back for the future versions… Sorry, I can’t get the message back
because it was in 5.1.4…
I just checked, and there was a single occurrence of max_error. But I remember it
was pointing to the same line, same offset (52, 6). Just in case, I thought that the program
didn’t reload the file, so I restarted Kicad, but I had the same error, same place.

Pascal

You likely didn’t remove the value or didn’t balance the brackets if that’s the case. The error message should give you a clue to what is broken in the format.

Can you open the file with notepad++ or similar and see what the lines around there say?

What version was used to create the project

  1. Create an new project in 5.1.4
  2. Drop in a symbol with a footprint, open pcbnew and
  3. Run pcbnew, import the schematic and save the pcb
  4. Open the *.kicad_pcb with an editor (like notepad, notepad++ etc) in the new project you created
  5. Copy the first line, the open the *.kicad_pcb from the original project and replace the first line with the copied text
  6. delete the line max_error line (there is only 1 line)
  7. delete the entire “defaults” section
1 Like

Nightly builds deviated from the old file format long time (several months) ago. See Post-v5 new features and development news.

The nightly builds should always be able to open old files - if not, it’s a serious bug. But they always write new information there when saving the file. Going back and forth isn’t a good option. I don’t understand what you mean by

What exactly you want to do, just go back to the stable version or what?

Nightly sometimes can not open files by older nightlies. Or not correctly at least. This happens if something bad got through in some version like the wrong interpretation of the 3d model offset parameter sometime during v5 development

Disclaimer: I only know it was between offset and at parameter, i could have these two confused but the core problem stays the same:

The offset parameter is in inches. The devs found this odd and changed it to mean mm -> created problems with old files as kicad could not know what the parameter meant. Solution: introduce new parameter “at” which is in mm and keep old offset parameter in inches. But there were a few nightly versions that saved offset in mm -> hence no other versions will ever read the file the same way, not older ones but also not newer ones!

This is why it is never a good idea to run nighlties for production. Use it to help develop kicad and be aware that it can bite you. If you use it for production then at least do not update in the middle of a project. (If you can not help it then at least backup before the update)

1 Like

Hello guys!
Thanks for all your replies.I’m a bit in a hurry now, so I will continue with the version I was using to make
these files. By the way, is there a way to have 2 concurrent versions?
NB: I’m aware that the older version would always refuse to directly open newer files, but in some cases
it would be useful.
Thanks,
Pascal

I forget what OS you run, but if you are on Windows, check out this thread from the FAQ:

On ubuntu it is even easier. Just install both. The package takes care of the rest. Not sure how it is in other distros.

Not so fast - there are quite many packages to choose from. The packages must have different names or locations for the same files, otherwise one package must replace the other. Jsreynaud has nightly packages for that purpose: https://launchpad.net/~js-reynaud/+archive/ubuntu/kicad-dev-nightly. As far as I can see it even separates the configuration directories.

The stable version would be installed from https://launchpad.net/~js-reynaud/+archive/ubuntu/kicad-5.1.

I am not aware of any ubuntu nightly package that is not made this way.

https://launchpad.net/~js-reynaud/+archive/ubuntu/ppa-kicad (see also https://launchpad.net/~js-reynaud)

Why does this still exist? This just confuses users. Well luckily (hopefully) it is not referenced on the website so it should be quite hard to stumble across it.

Hello!

I got more time to try to find the solution today.
@hyiger (details 1 … 7)
That’s what I tried to do last time.
After complaining that the version is newer than blah blah, I replaced the first line with a fresh file.
I got this message:

KicadBug01

Then I tried to delete line 67, the max error stuff.

I got this:

KicadBug02

Then, looking at what was at line 67, I got a block strting with (defaults

And I get almost the same message, offset 7 instead of 6.

KicadBug03

Is there a way to correct the problem?

I was using kicad-r13955.c7fc54b34-x86_64 which can open the files.

Thanks!

Pascal

Hello again!

I opened the old and new formats and in fact if you want to open an uncompatible file with 5.1.4,
the first line is not enough.
Copy everything from the line “(page A4)” until the line with “(net 0 “”)”. And it works.
I didn’t try to copy everything before the net definition lines, I’ll try that now with a real project
and post the results. Stay tuned.

Pascal

Just a heads up: zone handling changed quite significantly in nightly. Meaning opening it in earlier versions will mean zones might look different now. There is no backport available. See mailing list for details.

In other words: Mixing nightly and stable is not suggested. Backporting once should not be a problem if you get it done (manually fixing all reported file format errors). Just be aware that you need to refill zones and run DRC.

2 Likes