TypeError:'dict' object is not callable

TypeError:'dict' object is not callable

 

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

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

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

原文地址:https://www.cnblogs.com/li134655/p/7475886.html