AttributeError: module 'dash.dash' has no attribute 'dependencies'
AttributeError: module 'dash.dash' has no attribute 'dependencies'
以下是我的错误,
Traceback (most recent call last): File "app.py", line 54, in
dash.dependencies.Output('react-graph','figure'), AttributeError: module 'dash.dash' has no attribute 'dependencies'
以下是我的进口商品,
from dash import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.graph_objs as go
import psycopg2
import os
import flask
下面是我的回调函数
@app.callback( dash.dependencies.Output('react-graph','figure'), [dash.dependencies.Input('reg_col','value')] )
我的当前目录中没有任何名为 dash.py 的文件。我还尝试将导入破折号从破折号更改为仅导入破折号。前者给我以下错误。
Dash was not successfully imported. Make sure you don't have a file named 'dash.py' in your current directory.
下面是我的sys.path,
的内容
'P:\CC\Commercial\Nilay\ProjectX\Interactivity_test\Interactivity_test',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\python36.zip',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\DLLs',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages\Babel-2.5.0-py3.6.egg',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages\win32',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages\win32\lib',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages\Pythonwin']
进一步调查,检查
的内容
__init__.py
文件中显示了一些不完整的行,这可能是由于安装不当而遗漏的。
我已经用 (https://github.com/plotly/dash/blob/master/dash/init.py) 中的内容更改了文件,错误不再存在。
以下是我的错误,
Traceback (most recent call last): File "app.py", line 54, in dash.dependencies.Output('react-graph','figure'), AttributeError: module 'dash.dash' has no attribute 'dependencies'
以下是我的进口商品,
from dash import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.graph_objs as go
import psycopg2
import os
import flask
下面是我的回调函数
@app.callback( dash.dependencies.Output('react-graph','figure'), [dash.dependencies.Input('reg_col','value')] )
我的当前目录中没有任何名为 dash.py 的文件。我还尝试将导入破折号从破折号更改为仅导入破折号。前者给我以下错误。
Dash was not successfully imported. Make sure you don't have a file named 'dash.py' in your current directory.
下面是我的sys.path,
的内容'P:\CC\Commercial\Nilay\ProjectX\Interactivity_test\Interactivity_test',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\python36.zip',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\DLLs',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages\Babel-2.5.0-py3.6.egg',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages\win32',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages\win32\lib',
'C:\Users\nilay.doshi\AppData\Local\Continuum\anaconda3\lib\site-packages\Pythonwin']
进一步调查,检查
的内容__init__.py
文件中显示了一些不完整的行,这可能是由于安装不当而遗漏的。
我已经用 (https://github.com/plotly/dash/blob/master/dash/init.py) 中的内容更改了文件,错误不再存在。