Corrupt Dynamo file

I’ve been working on a Dynamo script and the laptop I’ve been using has started malfunctioning recently. I had saved my script just in the nick of time and started running it when my laptop suddenly switched off. When I turned it back on and tried to reopen my script, it said that it’s corrupted and can’t open it. This definitely isn’t a dynamo version issue as I opened another script successfully in the same version. It’s specifically this file and I’m sure it’s due to the laptop just switching off while I was in the middle of running it.

I’ve tried renaming it and also tried opening it in a later Revit version and no good. I’ve also cleared out the temp folder and still nothing. Has anyone come across this problem and found a way to fix it? I have a slightly older version of this script under a different name that I can always use if the worst comes to the worst, but I’ve put a few months of work into the script with thousands of lines of code and put quite a bit of work into it in the last couple of days and I’m not about to let it go.

Have you tried making a copy?

Yes I tried making a copy and saved it on my desktop and it won’t open either

You could check your backup folder %APPDATA%\Dynamo\Dynamo Revit\backup
Try opening the file in notepad or other text editor - it should be a readable JSON and start something like this

{
  "Uuid": "419341d0-9071-411c-9835-0400cb7bb997",
  "IsCustomNode": false,
  "Description": "",
  "Name": "Home",
  "ElementResolver": {
    "ResolutionMap": {}
  },
  "Inputs": [],
  "Outputs": [],
1 Like

Can’t say I have. If you post the file we can take a look, but it may be that you’ve cleared out the backup already by reopening the original file.

I tried this and it worked. I did lose about half an hour of work, but it backed up the rest of my work on the weekend and I remember the last half hour anyway and can redo it, so it’s good enough! Thank you very much, Mike!

1 Like

All good, most of it has been salvaged. The original file I saved under a different name so it wouldn’t have overridden the backup. Thank you though.

Glad you’re squared away. If you could submit a support ticket via the accounts portal or post to the Dynamo GitHub it would help us to prevent future issues. Thanks!

1 Like