我把request内置库和 requests库  给搞混了

requests使用来发送请求的,

request 而是用来获取数据的

别看只有一个单词只差,却让我找了大半天

requests.post(***) 发送请求  post必须是小写的
 
request.POST.get() 是用来获取数据的
 
这是错误的代码
 
    re_dict = request.POSt(access_token_url,data={
"client_id": '',
"client_secret": "6c070dfa032e5d2c363f5a3d9789220d",
"grant_type":"authorization_code",
"code": code,
"redirect_uri": "http://127.0.0.1:8000/md_admin/weibo",
})

这是正确的

    re_dict = requests.post(access_token_url,data={
"client_id": '',
"client_secret": "6c070dfa032e5d2c363f5a3d9789220d",
"grant_type":"authorization_code",
"code": code,
"redirect_uri": "http://127.0.0.1:8000/md_admin/weibo",
})

'QueryDict' object is not callable 错误解析的更多相关文章

  1. TypeError: 'QueryDict' object is not callable

    id = int(request.POST('id')) Error message: TypeError: 'QueryDict' object is not callable Error rese ...

  2. python"TypeError: 'NoneType' object is not iterable"错误解析

    尊重原创博主,原文链接:https://blog.csdn.net/dataspark/article/details/9953225 [解析] 一般是函数返回值为None,并被赋给了多个变量. 实例 ...

  3. python出现'module' object is not callable错误

  4. 错误:'dict' object is not callable

    在晚上学习别人的代码,偶然爆出错误:'dict' object is not callable 找了半天没发现错误.后来还想上文已经有变量名为dict. 因此dict在下面程序中被认为是一个变量不是内 ...

  5. java/javac命令行如何同时引用多个包;错误 TypeError: 'JavaPackage' object is not callable 的含义

    出现这类错误提示:'JavaPackage' object is not callable,可以看下所引用的jar包或者class文件是否在java的路径搜索范围内 命令行模式下:javac可以编译* ...

  6. python import 错误 TypeError: 'module' object is not callable

    python import 错误 TypeError: 'module' object is not callable 在这里,有 Person.py test.py; 在 test.py 里面 im ...

  7. 解决Flask和Django的错误“TypeError: 'bool' object is not callable”

    跟着欢迎进入Flask大型教程项目!的教程学习Flask,到了重构用户模型的时候,运行脚本后报错: TypeError: 'bool' object is not callable 这是用户模型: c ...

  8. 调用日志输出错误:TypeError: 'int' object is not callable等

    *)TypeError: 'int' object is not callable 错误信息: Traceback (most recent call last): File "Visual ...

  9. Django 错误:TypeError at / 'bool' object is not callable

    使用 Django自带的 auth 用户验证功能,编写函数,使用 is_authenticated 检查用户是否登录,结果报错: TypeError at / 'bool' object is not ...

随机推荐

  1. python 09 文件操作

    一 流程: #1. 打开文件,得到文件句柄并赋值给一个变量 #2. 通过句柄对文件进行操作 #3. 关闭文件 二 例子 #1. 打开文件,得到文件句柄并赋值给一个变量f=open('a.txt','r ...

  2. Python之PIL库

    Python PIL PIL (Python Image Library) 库是Python 语言的一个第三方库,PIL库支持图像存储.显示和处理,能够处理几乎所有格式的图片. 一.PIL库简介 1. ...

  3. 一个jar包冲突引起的StackOverflowError

    项目运行中错误信息:java.lang.IllegalStateException: Unable to complete the scan for annotations for web appli ...

  4. swagger 参数

    http://www.mamicode.com/info-detail-2213514.html

  5. Latex引用\ref

    在等式/图/定理等后面加\label{name} 正文引用方法:等式使用 \eqref{name},非等式引用可使用\ref{name}.

  6. springboot整合redis-sentinel支持Cache注解

    一.前提 已经存在一个redis-sentinel集群,两个哨兵分别如下: /home/redis-sentinel-cluster/sentinel-1.conf port 26379 dir &q ...

  7. sql批量新增,修改

    <insert id="insertExtDocList" parameterType="map"> INSERT INTO extprjdoc ( ...

  8. mysql thread pool

    转自:http://blog.csdn.net/wyzxg/article/details/8258033 mysql 线程处理流程图: Mysql支持单线程和多线程两种连接线程模式,如果单线程,则在 ...

  9. 关于Apahce服务器安装中遇到的问题

    在这篇中,将记录一下安装Apache服务器所遇到的一些问题,并简单讲一些Apache和Tomcat的区别: 1>apache安装中遇到的问题: 1.1 Apache目前不再提供编译好的exe安装 ...

  10. JS中encodeURI()、decodeURI()、encodeURIComponent()和decodeURIComponent()编码与解码

    编码解码问题. 解决这个问题大家一般都使用encodeURI或者encodeURIComponent方法,在这里做一下总结: 首先看看各个方法不同浏览器的支持程度 函数 描述 FF N IE deco ...