What does io.UnsupportedOperation error mean: fileno inside flask?

1

I am new to the world of programming and I run into this error when using Flask. I copied and pasted the code found on the official Flask website:

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello, World!'
app.run()

But when it comes to executing it, Python responds with this error:

Traceback (most recent call last):
File "C:\Users\Equipo\Desktop\ING. DE SISTEMAS\Introduccion a la 
programacion\Flask Tutorial\hola_mundo.py", line 8, in <module>
app.run()
File "C:\Users\Equipo\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\flask\app.py", line 938, in run
cli.show_server_banner(self.env, self.debug, self.name, False)
File "C:\Users\Equipo\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\flask\cli.py", line 629, in show_server_banner
click.echo(message)
File "C:\Users\Equipo\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\click\utils.py", line 217, in echo
file = _default_text_stdout()
File "C:\Users\Equipo\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\click\_compat.py", line 621, in func
rv = wrapper_func()
File "C:\Users\Equipo\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\click\_compat.py", line 385, in get_text_stdout
rv = _get_windows_console_stream(sys.stdout, encoding, errors)
File "C:\Users\Equipo\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\click\_winconsole.py", line 261, in _get_windows_console_stream
func = _stream_factories.get(f.fileno())
io.UnsupportedOperation: fileno

I really do not know why this error occurs, since Flask has been installed correctly. I repeat, I am new and until now I have not found a clear answer.

I appreciate the help in advance.

    
asked by Santiago Collantes Zuluaga 06.05.2018 в 19:22
source

0 answers