This is an internal issue of Jupyter Notebook, as it doesn't support this
functionality. However, you can run this manually:
(Append this code at the end)
# starting the app on port
try:
# works fine while running the py script in the command-line
app.run(debug=True,port=8000)
except:
# internal issue with Jupyter Notebook
print("Exception occured!")
# running manually
from werkzeug.serving import run_simple
run_simple('localhost', 9000, app)
On Sunday, 8 July 2018 08:25:30 UTC+5:30, [email protected] wrote:
>
> Hello,
>
> I have a python application using Flask. It runs fine from command prompt
> on Windows 10.
> But when I try to run the same application from Jupyter Notebook (from
> Anaconda), I get following error for the
> call : app.run(debug=True, port=8000)
>
> The error I get:
>
> UnsupportedOperation Traceback (most recent call
> last)
> <ipython-input-13-b728e01956cc> in <module>()
> ----> 1 app.run(debug=True, port=8000)
>
>
> ~\AppData\Local\conda\conda\envs\deeplearning\lib\site-packages\flask\app.py
> in run(self, host, port, debug, load_dotenv, **options)
> 936 options.setdefault('threaded', True)
> 937
> --> 938 cli.show_server_banner(self.env, self.debug, self.name,
> False)
> 939
> 940 from werkzeug.serving import run_simple
>
>
> ~\AppData\Local\conda\conda\envs\deeplearning\lib\site-packages\flask\cli.py
> in show_server_banner(env, debug, app_import_path, eager_loading)
> 627 message += ' (lazy loading)'
> 628
> --> 629 click.echo(message)
> 630
> 631 click.echo(' * Environment: {0}'.format(env))
>
>
> ~\AppData\Local\conda\conda\envs\deeplearning\lib\site-packages\click\utils.py
>
> in echo(message, file, nl, err, color)
> 257
> 258 if message:
> --> 259 file.write(message)
> 260 file.flush()
> 261
>
> UnsupportedOperation: not writable Can I get some help Please ? Thanks,
> S. Sarkar
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jupyter/884f3f5b-1617-41b3-9f3e-627609520156%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.