background
There is a flask project, and then a route returns dict
When accessed through the browser, an error is reported
Key error message
TypeError: 'dict' 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 dict.
It means that dict cannot be returned
Solution
The result is that the version is too old. I used flash 1.0.2… I took it. I ran other people’s projects and installed an old version of flash. Just install the latest version
Similar Posts:
- TypeError: ‘unicode’ object is not callable
- TypeError: ‘unicode’ object is not callable
- Unable to return file stream in Python 3, uwsgi report error
- Strange frame error caused by incorrect use of flash. Redirect (‘/ path’) in flash
- Python TypeError: not all arguments converted during string formatting
- [leetcode] 140. Word break II word split II
- Error “modulenotfounderror: no module named” in installing flash in Python 3.8_ ctypes’”
- When deploying Django project on centos7, there will be an error of importerror: cannot import name middlewaremin
- How to Solve dracut-initqueue Warning: dracut-initqueue timeout – starting timeout scripts
- The Usage of v-clock