KeyError: 'parameter'

Hello! Recently, I have been following this tutorial:

And I found KeyError: ‘parameter’ which I believe comes from this line which used to select the parameter from a category.

parameters = commit_data[selected_category][0][“parameters”].get_dynamic_member_names()

Is there something wrong with the code?

I really appreciate any help you can provide.

The way categories are defined has changed a bit over time, you can inspect your specific data structure from the scene explorer on our viewer page.
Alternatively, if you post a link to your model we can have a look!

I suspect it has to do with: BREAKING CHANGE: Introducing Collections Class for Predictable Data Hierarchies: Testing the Revit Connector

Hello! thank you for your response. I am trying to edit the code based on the new structure, and it works!

I am using the exact model from the repo and edit the line:

parameters = commit_data.getitem(selected_category)[0][“parameters”].get_dynamic_member_names()

2 Likes