dunovank / jupyter-themes

Custom Jupyter Notebook Themes
MIT License
9.76k stars 1.06k forks source link

IPython.core.display import HTML causes Kernel to crash #115

Open kazistan opened 7 years ago

kazistan commented 7 years ago

Displaying certain websites with ASP.NET extension within a jupyter tab causes a jt themed notebook to crash to a 404 error & can no longer open under jupyter notebooks (even when restoring to default theme).

Here's the code I wrote to replicate:

  1. Execute on cmd line jt -t chesterish

  2. Start jupyter notebook & open new notebook jupyter notebook

  3. Write in first tab from IPython.core.display import HTML HTML('http://www.nasdaq.com/screening/company-list.aspx')

  4. Prompt for leaving site appears Click "Stay" & save. Error below tab appears:

Javascript error adding output! ReferenceError: updateSiteTheme is not defined See your browser Javascript console for more details.

  1. Exit notebook and attempt to reload 404 Error now appears with 403 POST ... '_xsrf' argument missing from POST error in terminal
dunovank commented 7 years ago

Here's the output I get when importing and running the HTML command. image

Here's a shot of the same error message (shown below the rendered site page in red) image

However the Kernel didn't crash on me (was still able to execute code in the cells below) and was able to reopen the notebook again after closing it.

If I run the same command without jupyterthemes installed I get very similar errors (although slightly different). Not sure exactly what the issue, or whether the errors are thrown bc of something in jupyterthemes or the HTML library.

image

I don't have any immediate ideas about what the errors are referring to. Will post any updates here if I come across an answer.

kazistan commented 7 years ago

The issue goes away after pip uninstalling themes - however, just copying & pasting the css into custom.css doesn't cause any issues.