Bug with webargs 6.0.0
Created by: SilkeDH
Description
When trying to predict an image with the DEEPaaS API an error arises saying that no files were read. We figured out that it is caused by the new webargs version, released yesterday.
Steps to Reproduce
- Deployed the container.
- Ran deepaas-run.
- Tried to upload an image for prediction.
Expected behavior:
Return a json with the results.
Actual behavior
Got as a response:
{'files': ['Missing data for required field.']}
Jupyter:
2020-02-28 12:56:02.350 3571 ERROR aiohttp.server [-] Error handling request: aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
2020-02-28 12:56:02.350 3571 ERROR aiohttp.server Traceback (most recent call last):
2020-02-28 12:56:02.350 3571 ERROR aiohttp.server File "/opt/conda/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 275, in data_received
2020-02-28 12:56:02.350 3571 ERROR aiohttp.server messages, upgraded, tail = self._request_parser.feed_data(data)
2020-02-28 12:56:02.350 3571 ERROR aiohttp.server File "aiohttp/_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
2020-02-28 12:56:02.350 3571 ERROR aiohttp.server aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
2020-02-28 12:56:02.350 3571 ERROR aiohttp.server
2020-02-28 12:56:47.433 3571 INFO aiohttp.access [-] 147.213.75.181 [28/Feb/2020:12:56:47 +0000] "GET /ui HTTP/1.1" 200 1615 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0"
Solution
The bug disappeared by downgrading to webargs 5.5.3 with pip install webargs==5.5.3
.