python中使用破折号的Web应用程序 [英] web application using dash in python
本文介绍了python中使用破折号的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在spyder中使用破折号开发了一个简单的程序,但它向我显示了以下错误.
I have develop a simple program using dash plotly in spyder but it showing me the following error.
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
app.layout = html.Div(
html.H1(children='Hello Dash')
)
if __name__ == '__main__':
app.run_server(debug=True)
但是它显示了以下错误.
but it showing me the following error.
Running on http://127.0.0.1:8050/
Debugger PIN: 870-923-677
Traceback (most recent call last):
File "<ipython-input-13-3c5b23764cd8>", line 5, in <module>
app.run_server(debug=True)
File "C:\Users\Hussnain\Anaconda3\lib\site-packages\dash\dash.py", line 1503, in run_server
self.server.run(port=port, debug=debug, **flask_run_options)
File "C:\Users\Hussnain\Anaconda3\lib\site-packages\flask\app.py", line 938, in run
cli.show_server_banner(self.env, self.debug, self.name, False)
File "C:\Users\Hussnain\Anaconda3\lib\site-packages\flask\cli.py", line 629, in show_server_banner
click.echo(message)
File "C:\Users\Hussnain\Anaconda3\lib\site-packages\click\utils.py", line 259, in echo
file.write(message)
UnsupportedOperation: not writable
推荐答案
Spyder使用 Debug = True
有一些冲突.请在Visual Studio代码中运行您的代码.
Spyder has some conflicts using Debug=True
. Please run your code inside Visual Studio Code.
对于我的系统:您的代码运行正常.
For my system: Your code is running fine.
请告诉我们此软件交换是否解决了您的问题.如果没有,我将提供进一步的帮助.:)
Please tell us if this software swap solved your problem. If not, I will provide further assistance. :)
这篇关于python中使用破折号的Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文