'str' object has no attribute 'streaming'
来源:互联网 发布:杭州 政府网站 建站 编辑:程序博客网 时间:2024/05/21 07:03
目标,请求这个url,返回json
我的做法
def main(request):
return json.dumps({'a':'b'})
请求这个url,django报错
'str' object has no attribute 'streaming'
告诉我返回信息不可以为字符串(我猜的)
解决办法
from django.http import JsonResponse
def main(request):return JsonResponse({'a':'b'})
阅读全文
0 0
- 'str' object has no attribute 'streaming'
- Django 错误信息:AttributeError: 'str' object has no attribute '_meta'
- Django: AttributeError: 'str' object has no attribute 'resolve'
- object has no attribute 'cleaned_data'
- python遇到AttributeError: 'str' object has no attribute '_getAssertEqualityFunc'问题解决过程
- python 提示错误AttributeError: type object 'str' has no attribute '_name_'
- python机器学习实战3.2提示错误AttributeError: type object 'str' has no attribute '_name_'
- Scrapy抓取数据循环报AttributeError: 'str' object has no attribute 'css'
- 'ContactForm' object has no attribute 'clean_data'
- AttributeError: 'classmethod' object has no attribute '__module__'
- AttributeError: 'module' object has no attribute 'getpass'
- 'module' object has no attribute 'basicConfig'
- AttributeError: ‘NoneType’ object has no attribute ‘clone’
- 'SafeUnicode' object has no attribute 'status_code'
- AttributeError: 'module' object has no attribute 'Serial'
- AttributeError: 'NoneType' object has no attribute 'clone'
- unicode' object has no attribute 'read' json
- ‘dict’ object has no attribute 'has_key'解决办法
- 刷题知识点汇总(一)
- mysql 优化学习一
- elasticsearch(一) 基础入门级demo
- Kattis
- HDU1717(小数化分数,思维数学题)
- 'str' object has no attribute 'streaming'
- 《Java从入门到放弃》JavaSE入门篇:面向对象语法一(入门版)
- ajax—post请求
- 安装Jenkins时不能联网安装插件问题解决
- windows用mysql命令导入大数据的解决方法(phpmyadmin导入慢的解决办法)
- 【工具】消息队列-kafka安装(windows)
- 类和对象 编程题#2(Coursera 程序设计与算法 专项课程3 C++程序设计 郭炜、刘家瑛;OpenJudge)
- Raft一致性算法
- LeetCode 219. Contains Duplicate II