我正在尝试在本地主机中初始化破折号服务器,并且显示以下错误:OSError: [Errno 48] Address already in use
我尝试将端口和地址从localhost更改为另一个,并向我显示以下错误
An exception has occurred, use %tb to see the full traceback.SystemExit: 1
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash(__name__)
server = app.server
app.layout = html.Div([
html.H1("Mapa de distribucion Electrica"),
html.H3("Seleccionar Region")
])
if __name__ == '__main__':
app.run_server(debug=True)
答案 0 :(得分:0)
Dash服务器的默认端口是8050。似乎某些东西已经在使用该端口。您可以找出原因并停止它.....,也可以通过将port
参数传递到run_server
if __name__ == '__main__':
app.run_server(debug=True, port=8051) # or whatever you choose