TypeError:'dict' object is not callable

出现这种错误有两种可能:

  1. 代码里重新定义了dict,比如 dict= {…},这时调用的是代码里定义的dict而不是python内置类型

  2. 取字典内容时用了()而不是[]。比如sdict(“content_id”),应该是sdict[“content_id”]

猜你喜欢

转载自blog.csdn.net/qq_43199836/article/details/82937844