id = int(request.POST('id'))

Error message:

  TypeError: 'QueryDict' object is not callable

Error reseaon:

  request.POST is a QueryDict

dictionary lookup syntax instead:

  id = int(request.POST['id'])

TypeError: 'QueryDict' object is not callable的更多相关文章

  1. python Flask :TypeError: 'dict' object is not callable

    flask 基于Werkzeug .. @moudule.route('/upload', methods=['GET', 'POST']) def upload_file(): global _fl ...

  2. TypeError: 'module' object is not callable cp fromhttp://blog.csdn.net/huang9012/article/details/17417133

    程序代码  class Person:      #constructor      def __init__(self,name,sex):           self.Name = name   ...

  3. appium 提示报错“TypeError: 'unicode' object is not callable”的解决方式!

    这里提到的这个报错,是小错误且容易经常会犯,有时需要特别注意使用. 目的要求结果:根据某个元素的id值获取到对应id的text值,并且将获取的text值与本身存在的text值做比较,查看text值是否 ...

  4. Python学习笔记1 -- TypeError: 'str' object is not callable

    Traceback (most recent call last): File "myfirstpython.py", line 39, in <module> pri ...

  5. Python TypeError: 'module' object is not callable 原因分析

    今天尝试使用pprint进行输出,语句为 >>>import pprint >>>pprint(people) 结果报错,TypeError: 'module' o ...

  6. python TypeError: 'int' object is not callable 问题解决

    TypeError: 'int' object is not callable 这个错误的原因很简单 看下面的程序: def loss(a,b): return a-b loss = 0 loss = ...

  7. flask渲染模板时报错TypeError: 'UnboundField' object is not callable

    渲染模板时,访问页面提示TypeError: 'UnboundField' object is not callable 检查代码,发现实例化表单类是,没有加括号:form = NewNoteForm ...

  8. Python: TypeError: 'dict' object is not callable

    问题:  TypeError: 'dict' object is not callable 原因:  dict()是python的一个内建函数,如果将dict自定义为一个python字典,在之后想调用 ...

  9. PyCharm+selenium环境搭建报错:Traceback (most recent call last): TypeError: 'module' object is not callable

    环境搭建好后,代码如下: from selenium import webdriverdriver = webdriver.chrome()driver.get("http://www.ba ...

随机推荐

  1. js中的this指向

    1, 指向window 全局变量 alert(this) //返回 [object Window] 全局函数 function sayHello(){ alert(this); } sayHello( ...

  2. [C++程序设计]指向数组元素的指针

    如果先使p指向数组a的首元素(即p=a),则: (1) p++(或p+=1).使p指向下一元素,即a[1]. 如果用*p,得到下一个元素a[1]的值. (2) *p++.由于++和*同优先级,结合方向 ...

  3. CentOS 6.4 下安装 Apache

    下载地址:http://mirror.bit.edu.cn/ 参数 描述 prefix 安装目录 enable-rewrite 开启 rewrite 模块 sysconfdir 配置文件目录 ./co ...

  4. set(二叉搜索树)

    找球号(一) 时间限制:3000 ms  |  内存限制:65535 KB 难度:3   描述 在某一国度里流行着一种游戏.游戏规则为:在一堆球中,每个球上都有一个整数编号i(0<=i<= ...

  5. USB设备类型代码(class类型)

    Base Class E0h (Wireless Controller) This base class is defined for devices that are Wireless contro ...

  6. 关于在Reshaper中添加代码模板代码段

    http://www.cnblogs.com/tristinjet/archive/2009/08/19/1550203.html 去 tools->模板中进行模板编辑设置

  7. 【ASP.NET MVC路由测试+性能调试工具】

    http://getglimpse.com https://github.com/Glimpse/Glimpse 百度网盘: http://pan.baidu.com/s/1jHuTtKa

  8. Master Theorem

    Master theorem provides a solution in asymptotic terms to solve time complexity problem of most divi ...

  9. (续)一个demo弄清楚位图在内存中的存储结构

    本来续---数字图像处理之位图在计算机中的存储结构一文,通过参考别人的代码,进行修改和测试终于成功运行. 该实例未使用任何API和相关类,相信如果对此实例能够完全理解那么将有进一步进行数字图像处理的能 ...

  10. 2、elasticsearch 的安装和插件的安装

    1.安装Elasticsearch集群 1.下载elasticsearch-2.0.0.tar.gz,执行tar -zxvf elasticsearch-2.0.0.tar.gz解压 2.修改conf ...