Я пытаюсь развернуть график da sh в IIS. Сначала я следовал инструкциям в ссылке: Flask на IIS - Джеймс Полера затем, когда я использую этот скрипт, он работает:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello from FastCGI via IIS!"
if __name__ == "__main__":
app.run()
, но когда я использую этот скрипт, он не работает для да sh:
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
app.layout = html.Div(children=[html.H1('Hello Dash!'),
html.Div('Dash: Web Dashboard with python'),
dcc.Graph(id='example',
figure={'data':[
{'x':[1,2,3],'y':[4,1,3],'type':'bar','name':'SF'},
{'x':[1,2,3],'y':[2,4,5],'type':'bar','name':'NYC'}
],
'layout':{'title':'BAR PLOTS'}
})
])
if __name__ == "__main__":
app.run_server()
я получаю эту ошибку:
Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 791, in main
env, handler = read_wsgi_handler(response.physical_path)
File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 633, in read_wsgi_handler
handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 600, in get_wsgi_handler
handler = __import__(module_name, fromlist=[name_list[0][0]])
File "C:\inetpub\wwwroot\mysite\app.py", line 1, in <module>
import dash
File "C:\ProgramData\Anaconda3\lib\site-packages\dash\__init__.py", line 1, in <module>
from .dash import Dash, no_update # noqa: F401
File "C:\ProgramData\Anaconda3\lib\site-packages\dash\dash.py", line 23, in <module>
import plotly
File "C:\ProgramData\Anaconda3\lib\site-packages\plotly\__init__.py", line 30, in <module>
from plotly import (
File "C:\ProgramData\Anaconda3\lib\site-packages\plotly\graph_objs\__init__.py", line 100161, in <module>
import ipywidgets
File "C:\ProgramData\Anaconda3\lib\site-packages\ipywidgets\__init__.py", line 23, in <module>
from IPython import get_ipython
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\__init__.py", line 55, in <module>
from .terminal.embed import embed
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\terminal\embed.py", line 15, in <module>
from IPython.core.interactiveshell import DummyMod, InteractiveShell
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 64, in <module>
from IPython.utils import io
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\utils\io.py", line 94, in <module>
stdin = IOStream(sys.stdin, fallback=devnull)
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\utils\io.py", line 38, in __init__
for meth in filter(clone, dir(stream)):
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\utils\io.py", line 37, in clone
return not hasattr(self, meth) and not meth.startswith('_')
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\utils\io.py", line 81, in closed
return self.stream.closed
ValueError: underlying buffer has been detached
Кто-то может помочь, вот уже два дня, как я пытался найти решение. Спасибо