I also ran into this, and spent way too long trying to figure it out.

For future visitors to this thread:

It turns out that the two parameters passed to the scripting.dictionary "add" function...