It should also work with a dict instead of a list.
Jupyter notebooks often fail to provide the error message and restart the kernels (if you are using it), so rerun the code in a terminal and check the error message.