guanshuicheng / invoice

Collaboration with wangxupeng(https://github.com/wangxupeng)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用postman测试报错

grey27 opened this issue · comments

commented

在项目根目录下新建一个名为test的文件夹即可

commented
commented
commented

你使用的是get的方法,请切换至post方法 | | 追梦者 邮箱:18010149119@163.com | 签名由 网易邮箱大师 定制 在2019年10月07日 15:02,quuhua911 写道: 服务已经正常启动,使用post方法访问,访问地址:http://172.17.0.1:8070/invoice-ocr ,传入key值:file,你看看app.py文件书写的api接口便知。回复 : 按照你的建议 填好后,还是报"请求参数错误"具体见截图,能否请您再指点一下,还需要修改哪里? 2019-10-07 14-56-08 的屏幕截图 9-10-03 20:31:16.997612: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0 2019-10-03 20:31:16.997643: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-10-03 20:31:16.997649: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0 2019-10-03 20:31:16.997653: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N 2019-10-03 20:31:16.997694: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8894 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1) Text detect engine:keras 2019-10-03 20:31:22.809804: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0 2019-10-03 20:31:22.809835: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-10-03 20:31:22.809841: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0 2019-10-03 20:31:22.809845: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N 2019-10-03 20:31:22.809886: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8894 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1) Text detect engine:keras 2019-10-03 20:31:29.346093: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0 2019-10-03 20:31:29.346124: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-10-03 20:31:29.346130: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0 2019-10-03 20:31:29.346133: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N 2019-10-03 20:31:29.346175: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8894 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1) Serving Flask app "app" (lazy loading) Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. Debug mode: off Running on http://172.17.0.1:8070/ (Press CTRL+C to quit) 192.168.0.100 - - [03/Oct/2019 20:32:04] "GET / HTTP/1.1" 404 - — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

我用的是post方法,这个可以见我发的截图和下面的信息
2019-10-07 14-54-33 的屏幕截图

192.168.0.100 - - [07/Oct/2019 15:14:46] "POST /invoice-ocr?file=/home/quh/pythonwork/invoice/1.jpg HTTP/1.1" 200 -
192.168.0.100 - - [07/Oct/2019 15:14:51] "POST /invoice-ocr?file=/home/quh/pythonwork/invoice/1.jpg HTTP/1.1" 200 -
你的请求方式有点问题,正确的请求方式见截图。
image

感谢各位大神,可以了.