Export / import flows

In Node Red v0... I saved a copy of my flow with the export function.
After a problem with my Raspberry Pi I installed a new version of NR.
In NR v1.3.4. I can't get the saved flow back, dozens of errors.
I there a conversion necessary?

The flow format has not changed.

What sort of errors are you getting?

SyntaxError: Unexpected token } in JSon at pos 169
260,"wires":},{"id.........

Something has corrupted your JSON file.

How did you save it? Where you are copy and pasting it from?

From the error message we can see a wires property missing its value.

260,"wires":},{"id.........

That is a common symptom when people paste their flows into this forum without wrapping it properly as a code block. The markdown parser sees the [] value of the wires property and treats it as a link syntax and strips it out.

The question is whether that corruption is in the source file you're copying from, or an artefact of how/where you are copying it from.

The SD card of my RPi failed and I was forced to install all my programs again.
Sadly I didn't save the flow on a separate drive and copied the flow from the forum.

I understand that I didn't put it correctly on the forum.
Now I have to build the flow again and I will save the flows in the correct manner.

Thank you for your help.

If you are copying it from the forum, then rather than copy it from the page directly, first click the pencil icon next to the post (maybe hidden behind the ... icon). That will take you to the edit page for the post where you'll see the original content before the markdown formatter is applied.

I tried to copy from the edit page, same errors.

My post from 18 jul 2020: Controlling model train.
Is it possible for you to open my post?

If you paste a link to it to save me searching - sure.

I have edited that post to show the flow in a proper code block. You should now be able to copy and paste from the post directly.

1 Like

Success.
The build of the SVG layout of the traintracks took a lot of time and sweat.

Thank you very much for the help.

Wow! that was super nice of you Nick.

1 Like

Nick has previously 'rescued' a flow for me that had some kind of internal issue; he's the best!

I really appreciate what he (and others) has built and the support provided. It is the main tool my team of 10 engineers use daily and I have never experienced that level of support even from a tool we paid $80K / year for.

Cheers!

Paul

I trust you have now started a regular backup scheme