Error when trying to merge a snapshot into the current model

Hi @chriswmackey,
I’ve encountered the same issue and received the following merging error (see the attached log file from Pollination Model Editor). However, I was able to successfully export the rooms (please see the attached screenshot).

How can I identify the cause of this problem? Also, is your proposed solution compatible with the latest version of the Pollination plugin for Revit?

Log file:

<>2025.06.09 11:42:32.068|info|⌛ init
2025.06.09 11:42:33.207|info|✅ Snapshot loaded!
2025.06.09 11:42:33.739|info|[Put]: tl-records success
2025.06.09 11:42:35.333|info|🐍 18 modules installed!
2025.06.09 11:42:35.370|info|Get SDK version...
2025.06.09 11:42:39.301|info|🐍 merge_models script is running...
2025.06.09 11:42:39.315|error|merge_models failed. Error message: Error: Traceback (most recent call last):
  File "/lib/python312.zip/_pyodide/_base.py", line 597, in eval_code_async
    await CodeRunner(
  File "/lib/python312.zip/_pyodide/_base.py", line 411, in run_async
    coroutine = eval(self.code, globals, locals)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<exec>", line 10, in <module>
  File "/home/pyodide/dragonfly/model.py", line 123, in from_dict
    assert data['type'] == 'Model', 'Expected Model dictionary. ' \
           ~~~~^^^^^^^^
KeyError: 'type'
<>
1 Like

Hey @arashdoz ,

I see you posted this on a topic that is a year and a half old and was fixed a while back. So I am going to move it to a new topic since it seems pretty clear that your issue different. For one, you are in the Model Editor and the old topic was made before the first release of the Model Editor.

The only way that you could get an error like this that I can think of is if you were trying to merge in a model file that was not a POMF/DFJSON/snapshot model file. Can you list the steps that you followed or maybe give us the file that you tried to merge so we can understand how you got here?

Hi @arashdoz,

If I have to guess, you’re clicking on the wrong button. Try to click on the first button to open the file and not the second button that imports the file.

image

From reading your question, you’re trying to open a Snapshot that you have exported from Revit and not merging one into an existing model. Is that correct?

1 Like

Thank you, @chriswmackey and @mostapha, for your reply, and my apologies for replying to an old topic. Let me describe the steps that I have taken:
I created different schedules for lighting, occupancy, and setpoints for each zone using the Schedule Manager. Then, I defined a separate program for each zone using the Program Type Manager. In the final step, before creating the snapshot, I assigned the appropriate program to each zone. For the bathroom, kitchen, and toilet zones, I also activated the service hot water system in the corresponding window (Please see the picture). After that, I created the snapshot. However, when I clicked the “Import” button in the Model Editor, I encountered a merging error.
I can share both the POMF and DFJSON files with you if needed.

Thank you @mostapha, I think it can solve the problem.