I was attempting to print dict which threw the error.. I think this fixes it.