From 08a54a3868f57aeb26f2c05b82013e492526bdb9 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Tue, 16 Apr 2019 18:29:24 +0200 Subject: [PATCH] Fallback on FileContentsManager when LargeFileManager is not available #217 --- jupytext/contentsmanager.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jupytext/contentsmanager.py b/jupytext/contentsmanager.py index cd3c09ac4..659e2b27e 100644 --- a/jupytext/contentsmanager.py +++ b/jupytext/contentsmanager.py @@ -14,7 +14,12 @@ except ImportError: pass -from notebook.services.contents.largefilemanager import LargeFileManager +try: + from notebook.services.contents.largefilemanager import LargeFileManager +except ImportError: + # Older versions of notebook do not have the LargeFileManager #217 + from notebook.services.contents.filemanager import FileContentsManager as LargeFileManager + from jupyter_client.kernelspec import find_kernel_specs, get_kernel_spec from .jupytext import reads, writes, create_prefix_dir