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.
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
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!
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!