Error of pycharm shows AttributeError: module 'plotly. Offline' has no attribute '__PLOTLY_OFFLINE_INITIALIZED'
Help you!
Thank you very much!
CodePudding user response:
Changed the cufflinks in the library offline. Py files, will go_offline indentation adjust the last line:def go_offline (connected=None) :
"" "
Connected: bool
If True, the plotly. Js library will be the loaded
From an online CDN. If False, the plotly. Js library will be the loaded locally
The from the plotly python package
"" "
From the auth import get_config_file
If connected is None:
Try:
Connected=True if get_config_file () [' offline_connected] is None else get_config_file () [' offline_connected]
Except:
Connected=True
If run_from_ipython () :
Try:
Py_offline. Init_notebook_mode (connected)
Except TypeError:
# For older versions of plotly
Py_offline. Init_notebook_mode ()
Py_offline. __PLOTLY_OFFLINE_INITIALIZED=True