Plotly 3.0.0 FiguerWidget not working


Just installed Plotly 3.0.0 and tried the new syntax suggested in the Medium article.
When I print the widget, I get nothing (no plot shows up).
When I then open the console, I see the following Javascript error:

Temp%20distribution%20for%20avg%20flight.ipynb#:1 Uncaught (in promise) Error: Script error for “plotlywidget”
at makeError (require.js?v=6da8be361b9ee26c5e721e76c6d4afce:165)
at HTMLScriptElement.onScriptError (require.js?v=6da8be361b9ee26c5e721e76c6d4afce:1732)

Am I missing something, maybe some dependency?
I am running in Python 3.6.2


Ah, the missing dependency was the newest version of the notebook module.
Interesting that ‘pip install -U plotly’ will not automatically install that dependency…

Plotly 3.0.0 with JupyterLab not displaying plot

Can you please specify what was the solution for this problem?


Hi @LihiP

Perhaps the information here about jupyter notebooks and ipywidgets may be of use to you.


Hi @bcd
Thank you for this. however, I am using ipywidgets version 7.2.1 and notebook version 5.5.0 and it is still not working.

Error creating widget: could not find model

I’m guessing that the issue has to do with dependencies. Unfortunately, pip install -U doesn’t force upgrade all the dependencies, so something might be missing. For me, it was the notebook module. For you it might be something else.
I would try running pip install -U plotly and look at the output from pip. Try and manually install everything that pip doesn’t. If that doesn’t help, respond to this thread again.


FigureWidgets weren’t displaying for me - I had to update ipywidgets to get things working:

pip3 install ipywidgets --upgrade

FWIW, I had ipywidgets-7.0.5 and upgraded to ipywidgets-7.2.1. With 7.2.1, FigureWidgets display as expected :ok_hand:


I went over all plotly dependencies, but all libraries seem to be up to date and above the requirement.
if that makes any difference, I am using python 3 kernel within a notebook that is part of AWS SageMaker.


I use python 3.6.2 and have no issues.
Prior to executing the cell which causes the error (or isn’t displaying), open your javascript console.
Then execute the cell.
Are you seeing any js errors or warnings?


Not sure about anyone else, but I wasn’t even able to get the widgets module to install correctly due to JavaScript heap being out of memory:

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x100033dab node::Abort() [/usr/local/Cellar/node/10.5.0_1/bin/node]
 2: 0x10003557e node::FatalTryCatch::~FatalTryCatch() [/usr/local/Cellar/node/10.5.0_1/bin/node]
 3: 0x1001776a7 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/10.5.0_1/bin/node]
 4: 0x100177649 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/10.5.0_1/bin/node]
 5: 0x10045004a v8::internal::Heap::UpdateSurvivalStatistics(int) [/usr/local/Cellar/node/10.5.0_1/bin/node]
 6: 0x100451ced v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/usr/local/Cellar/node/10.5.0_1/bin/node]
 7: 0x10044f3af v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/Cellar/node/10.5.0_1/bin/node]
 8: 0x10044e300 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/10.5.0_1/bin/node]
 9: 0x1004564f7 v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/10.5.0_1/bin/node]
10: 0x100434108 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/local/Cellar/node/10.5.0_1/bin/node]
11: 0x10062d8c5 v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/Cellar/node/10.5.0_1/bin/node]
12: 0x2d837a9841bd 
13: 0x2d837a9d3a41