python错误: TypeError:'dict' object is not callable
2018-01-24 18:46
8553 查看
出现这种错误有两种可能:
1. 代码里重新定义了dict,如 pdict= {...},这时调用的是代码里定义的pdict而不是python内置类型
2. 取字典内容时用了()而不是[]。如pdict("content_id"),应该是pdict["content_id"]
1. 代码里重新定义了dict,如 pdict= {...},这时调用的是代码里定义的pdict而不是python内置类型
2. 取字典内容时用了()而不是[]。如pdict("content_id"),应该是pdict["content_id"]
相关文章推荐
- python错误:TypeError: 'str' object is not callable
- python错误:TypeError: 'module' object is not callable
- python错误:TypeError: 'module' object is not callable
- python write()参数错误,导致报错TypeError: a bytes-like object is required, not 'str'
- Python:TypeError: 'int' object is not callable
- Flask 中使用 JSON 响应页面的 Ajax 请求报错 TypeError: 'dict' object is not callable
- python提示错误TypeError: 'dict_keys' object does not support indexing
- PyOpenGL出现错误TypeError: 'NoneType' object is not callable
- Python错误代码分析:莫名的[TypeError: 'int' object is not iterable]
- TypeError: 'module' object is not callable错误处理
- Anaconda下import caffe出现错误TypeError: 'module' object is not callable
- TypeError:'dict' object is not callable
- Python 3.5 Socket TypeError: a bytes-like object is required, not 'str' 错误提示
- Python学习笔记 --- TypeError: 'unicode' object is not callable
- Python: TypeError: 'dict' object is not callable
- Python:TypeError: 'int' object is not callable
- 【Python】python "TypeError: 'NoneType' object is not iterable"错误分析
- python 2.7 : 引用模块时出现TypeError:'module' object is not callable
- python3在pycharm中为什么导入random模块不能用? TypeError: 'module' object is not callable
- Python包导入(TypeError: 'module' object is not callable),及一定要记住Python成员函数第一个参数值是self。