From 4e97a0c0575490a6ce778662a9a6374fdb7bfabb Mon Sep 17 00:00:00 2001 From: Steve Mandala Date: Thu, 1 Oct 2020 08:07:12 -0700 Subject: [PATCH] Pin nbconvert and revert html parsing Summary: fix the nbconvert to old and revert the html parsing Reviewed By: lena-kashtelyan Differential Revision: D24051937 fbshipit-source-id: 7c540d3f9a22f2f8cedaeab69ac10e53289ee5be --- scripts/make_tutorials.py | 5 +++-- setup.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/make_tutorials.py b/scripts/make_tutorials.py index 5f3cd95b411..c2990316b54 100644 --- a/scripts/make_tutorials.py +++ b/scripts/make_tutorials.py @@ -156,8 +156,9 @@ def gen_tutorials( # pull out html div for notebook soup = BeautifulSoup(html, "html.parser") - nb_meat = soup.find("div", {"class": "jp-Notebook"}) - nb_meat.attrs["class"].append(["notebook"]) + nb_meat = soup.find("div", {"id": "notebook-container"}) + del nb_meat.attrs["id"] + nb_meat.attrs["class"] = ["notebook"] # when output html, iframe it (useful for Ax reports) for html_div in nb_meat.findAll("div", {"class": "output_html"}): diff --git a/setup.py b/setup.py index dd883ca8f81..a221352e68e 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ "sphinx<3.0.0", "sphinx-autodoc-typehints", "torchvision>=0.5.0", + "nbconvert<=5.6.1", ] MYSQL_REQUIRES = ["SQLAlchemy>=1.1.13"]