为什么在Flask python中使用get方法时出现错误

时间:2019-02-22 11:15:43

标签: python python-3.x flask-restful

我试图通过在flask和python中使用get方法从url获取数据,但得到

class GridViewButton (
    val icon: Int,
    val name: String,
    val color: Int,
    val listener: View.OnClickListener
)

url:192.168.0.128 - - [22/Feb/2019 16:40:18] "TypeError: 'list' object is not callable The view function did not return a valid response. The return type must be a string, tuple, Response instance, or WSGI callable, but it was a list. 192.168.0.128 - - [22/Feb/2019 16:51:39] "GET /autocomplete?input=%27mumbai%27 HTTP/1.1" 500 -

脚本:

http://192.168.0.128:5000/autocomplete?input=%27mumbai%27

1 个答案:

答案 0 :(得分:1)

有错误信息发回给您。该错误是错误404

来自维基百科: 强调HTTP 404、404未找到和404错误消息是计算机网络通信中的超文本传输​​协议(HTTP)标准响应代码,用于指示客户端能够与给定服务器进行通信,但是服务器找不到要求的内容。

尝试将请求从/autocomplete/更改为/autocomplete