description
Python3 reports UnsupportedOperation when testing flask
sources of topics and their own ideas
Source: install and test flask according to Section 1.6.1 of "Python3 Web Crawler Development practice"
idea: query flask documents-installation and getting started, try to find out if the problem is set up; check whether Baidu has any relevant solutions; read the documents in the error report and don"t know where the problem is.
related codes
/ /
from flask import Flask
app = Flask (_ _ name__)
@ app.route ("/")
def hello ():
return "Hello World!"
if name ="_ _ main__":
app.run()
/ /
expected results and actual seen error messages
expected result: I hope I can pass the test and use flask normally
actual error message:
Traceback (most recent call last):
File "< ipython-input-9-aa76cd996e6c >", line 10, in < module >
app.run()
File "D:Softwareanacondalibsite-packagesflaskapp.py", line 938, in run
cli.show_server_banner(self.env, self.debug, self.name, False)
File "D:Softwareanacondalibsite-packagesflaskcli.py", line 629, in show_server_banner
click.echo(message)
File "D:Softwareanacondalibsite-packagesclickutils.py", line 259, in echo
file.write(message)
UnsupportedOperation: not writable