Error Reporting In Dynamo Graph Run From pyRevit Tab

I have a graph that I am running from a pyRevit tab in Revit. When I run this graph from Dynamo Player I see the warnings that come out of it. However, the pyRevit tab swallows the errors. Most of the time this is okay as the errors are benign and I am glad to not have to explain to users what is happeneing, but I have a case where I need to report that files did not copy. Any advice would be great.

Thanks!

You have a few options.

  1. Move back to Dynamo Player. Yes this might mean you need to educate users in error messages. But it also helps you get away from the IronPython2 security vulnerabilities which come with PyRevit. I love the tool and the team that maintains it, but that dependency isn’t something which we should be seeing anymore. And while educating users on the issues they see, the ability to resolve errors via the technical messages is likely going to be what keeps a lot of us employed when the next wave of AI lead automations hits the market (the timespan to that is less than we think, and so ‘fixing the AI driven disaster’ is a likely new hat many people will need to wear over the next decade). The security concern would have me go this route across the board.

  2. Build your own error handling into your graph. This will mean validating execution (check for the files) and informing the users what failed (which files didn’t get copied). This will let them know it didn’t work, but it won’t tell them why (which is likely a requirement in the end unless you want people to give up or lose trust in what you build). That why is going to require the technical info from Dynamo.

  3. Build a logging tool into the graph which extrapolates the result (fail/pass) and the technical failures. This can be done via custom Dynamo extension, but building that is not easy. More likely you could build a series of ‘checks’ along the graph and extrapolate the inputs > checks > output and then inform the user as per step 2 but also provide the detailed information on where in the graph to look for the failure.

  4. Move on from Dynamo and into an add-in which requires more of that error handling. Development timeframes go up exponentially as a result, but your errors are suppressed (the benefit you see in PyRevit) or as in your face as Dynamo Player (the drawback you see it it).

1 Like