isds2020 icon indicating copy to clipboard operation
isds2020 copied to clipboard

youtube video not running in jupyter notebook

Open carolinamariotto opened this issue 5 years ago • 4 comments
trafficstars

Hi! For some reason, none of the youtube videos in assignment 0 are running in Jupyter notebook for me. Is there something I can do to fix it?

carolinamariotto avatar Jul 14 '20 10:07 carolinamariotto

What output are you getting when trying to run the videos? Can you copy and paste the output here or send a screenshot?

jsr-p avatar Jul 14 '20 15:07 jsr-p

NameError Traceback (most recent call last) in ----> 1 YouTubeVideo('wEjO-0rx0c0', width=640, height=360)

NameError: name 'YouTubeVideo' is not defined

carolinamariotto avatar Jul 14 '20 16:07 carolinamariotto

The problem is that you haven't defined "YouTubeVideo".

At the top of the notebook (right underneath the subheading "First things first") there is a cell that defines "YouYubeVideo" with the following import statement: from IPython.display import YouTubeVideo

You will have to run this cell as the first thing before you can watch the YouTube videos in the notebook. Try to run this cell and then open the YouTube video :)

jsr-p avatar Jul 14 '20 16:07 jsr-p

thank you! now it works :)

carolinamariotto avatar Jul 14 '20 16:07 carolinamariotto