Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

nbdiff not displaying anything in browser #236

@jonathan-svds

Description

@jonathan-svds

I installed nbdiff via pip and everything looks like it should be working. When I run nbdiff a new tab opens on Chrome at http://127.0.0.1:5000/0 but the page remains completely blank (although the favicon turns to the Jupyter logo).

Here are two notebooks whose truncated diff is:

$ diff temp.ipynb 07-github-integration.ipynb
5c5
<    "execution_count": 2,

---
>    "execution_count": 1,
30c30
<       "Git hash   : 6573faf59947820dd010f59c147edf0cae218f65\n"

---
>       "Git hash   : 64eb7da402e5afbdbaf4461933111e5a8123aa98\n"
42c42
<    "execution_count": 3,

---
>    "execution_count": 2,
58c58
<    "execution_count": 11,

---
>    "execution_count": 3,
69c69
<    "execution_count": 12,

---
>    "execution_count": 4,
80c80
<    "execution_count": 13,

---
>    "execution_count": 5,
88c88
<        "<matplotlib.collections.PathCollection at 0x10d050350>"

---
>        "<matplotlib.collections.PathCollection at 0x10c25d7d0>"
91c91
<      "execution_count": 13,

---
>      "execution_count": 5,
97c97
<       "image/png": "iVBORw0KGgoAAAANSUhEUgAAAesAAAFVCAYAAADPM8ekAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t...

So I try to use nbdiff and I get:

$ nbdiff temp.ipynb 07-github-integration.ipynb
/Users/jonathan/anaconda/lib/python2.7/site-packages/IPython/nbformat/current.py:19: UserWarning: IPython.nbformat.current is deprecated.

- use IPython.nbformat for read/write/validate public API
- use IPython.nbformat.vX directly to composing notebooks of a particular version

  """)
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [10/Jun/2015 17:15:10] "GET /0 HTTP/1.1" 200 -
127.0.0.1 - - [10/Jun/2015 17:15:10] "GET /static/contents.js HTTP/1.1" 404 -

The source of the page doesn't look crazy:

<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">

    <title>IPython Notebook</title>
    <link rel="shortcut icon" type="image/x-icon" href="static/base/images/favicon.ico">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="stylesheet" href="static/components/jquery-ui/themes/smoothness/jquery-ui.min.css" type="text/css" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


<link rel="stylesheet" href="/nbdiff/css/nbdiff.css">
<link rel="stylesheet" href="/nbdiff/css/local.css">




<script type="text/javascript">
// MathJax disabled, set as null to distingish from *missing* MathJax,
// where it will be undefined, and should prompt a dialog later.
window.mathjax_url = "";
</script>

<link rel="stylesheet" href="static/components/bootstrap-tour/build/css/bootstrap-tour.min.css" type="text/css" />
<link rel="stylesheet" href="static/components/codemirror/lib/codemirror.css">


    <link rel="stylesheet" href="static/style/style.min.css" type="text/css"/>


<link rel="stylesheet" href="static/notebook/css/override.css" type="text/css" />
<link rel="stylesheet" href=""  id='kernel-css'                             type="text/css" />



    <link rel="stylesheet" href="static/custom/custom.css" type="text/css" />
    <script src="static/components/es6-promise/promise.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="static/components/requirejs/require.js" type="text/javascript" charset="utf-8"></script>
    <script>
      require.config({

          baseUrl: 'static/',
          paths: {
            nbextensions : 'nbextensions',
            kernelspecs : 'kernelspecs',
            underscore : 'components/underscore/underscore-min',
            backbone : 'components/backbone/backbone-min',
            jquery: 'components/jquery/jquery.min',
            bootstrap: 'components/bootstrap/js/bootstrap.min',
            bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min',
            jqueryui: 'components/jquery-ui/ui/minified/jquery-ui.min',
            moment: 'components/moment/moment',
            codemirror: 'components/codemirror',
            termjs: 'components/term.js/src/term',
          },
          shim: {
            underscore: {
              exports: '_'
            },
            backbone: {
              deps: ["underscore", "jquery"],
              exports: "Backbone"
            },
            bootstrap: {
              deps: ["jquery"],
              exports: "bootstrap"
            },
            bootstraptour: {
              deps: ["bootstrap"],
              exports: "Tour"
            },
            jqueryui: {
              deps: ["jquery"],
              exports: "$"
            }
          }
      });

      require.config({
          map: {
              '*':{
                'contents': '',
              }
          }
      });
    </script>




</head>

<body class="notebook_app " 

data-project="/"
data-base-url=""
data-ws-url=""
data-notebook-name="test_notebook0"
data-notebook-path="./"

>

<noscript>
    <div id='noscript'>
      IPython Notebook requires JavaScript.<br>
      Please enable it to proceed.
  </div>
</noscript>

<div id="header">
  <div id="header-container" class="container">
  <div id="ipython_notebook" class="nav navbar-brand pull-left"><a href="" title='dashboard'><img src='static/base/images/logo.png' alt='Jupyter Notebook'/></a></div>





    <span id="login_widget">

    </span>








<span id="save_widget" class="pull-left save_widget">
    <span id="notebook_name" class="filename"></span>
    <span class="checkpoint_status"></span>
    <span class="autosave_status"></span>
</span>

<span id="kernel_logo_widget">
  <img class="current_kernel_logo" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"/>
</span>


  </div>
  <div class="header-bar"></div>



<img src="/nbdiff/image/logo.png" id="nbdiff-logo" alt="NBDiff" />

<div id="nbdiff-controls">
    <button id='nbdiff-undo'>Undo</button>
    <button id='nbdiff-save'>Save</button>
    <button id='nbdiff-previous'>Previous Notebook</button>
    <button id='nbdiff-next'>Next Notebook</button>
    <button id='nbdiff-shutdown'>Shut Down</button>
    <span id='nbdiff-filename'></span>
</div>
<div id='current-notebook' style='display: hidden' data-current-notebook=0></div>
<div id='num-notebooks' style='display: hidden' data-num-notebooks=1></div>

</div>

<div id="site">


<div id="ipython-main-app">
    <div id="notebook_panel">
        <div id="notebook"></div>
        <div id='tooltip' class='ipython_tooltip' style='display:none'></div>
    </div>
</div>



</div>



<div id="pager">
    <div id="pager-contents">
        <div id="pager-container" class="container"></div>
    </div>
    <div id='pager-button-area'></div>
</div>







<script type="text/javascript">
    sys_info = ;
</script>

<script src="static/components/text-encoding/lib/encoding.js" charset="utf-8"></script>

<script src="static/notebook/js/main.js" charset="utf-8"></script>


<script type="text/javascript" src="/nbdiff/js/drag_drop.js"></script>
<script type="text/javascript" src="/nbdiff/js/command.js"></script>

<script type="text/javascript" src="/nbdiff/js/local.js"></script>

<script type="text/javascript" src="/nbdiff/js/nbdiff.js"></script>
<script type="text/javascript" src="/nbdiff/js/main.js"></script>


</body>

</html> 

I think that maybe running with --debug would help:

$ nbdiff temp.ipynb 07-github-integration.ipynb --debug
/Users/jonathan/anaconda/lib/python2.7/site-packages/IPython/nbformat/current.py:19: UserWarning: IPython.nbformat.current is deprecated.

- use IPython.nbformat for read/write/validate public API
- use IPython.nbformat.vX directly to composing notebooks of a particular version

  """)
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
/Users/jonathan/anaconda/lib/python2.7/site-packages/IPython/nbformat/current.py:19: UserWarning: IPython.nbformat.current is deprecated.

- use IPython.nbformat for read/write/validate public API
- use IPython.nbformat.vX directly to composing notebooks of a particular version

  """)
127.0.0.1 - - [10/Jun/2015 17:12:56] "GET /0 HTTP/1.1" 200 -
127.0.0.1 - - [10/Jun/2015 17:12:56] "GET /static/contents.js HTTP/1.1" 404 -
127.0.0.1 - - [10/Jun/2015 17:13:14] code 400, message Bad request version ('RTSP/1.0')
127.0.0.1 - - [10/Jun/2015 17:13:14] "GET /info?txtAirPlay&txtRAOP RTSP/1.0" 400 -
127.0.0.1 - - [10/Jun/2015 17:13:18] code 400, message Bad request version ('RTSP/1.0')
127.0.0.1 - - [10/Jun/2015 17:13:18] "GET /info?txtAirPlay&txtRAOP RTSP/1.0" 400 -

Opens 2 tabs in my Chrome browser (still doesn't work).

Also tried in Firefox, but nothing. Am I doing something wrong? My setup is a Macbook Pro,

Python 2.7.10 |Anaconda 2.1.0 (x86_64)| (default, May 28 2015, 17:04:42)
IPython 3.1.0 -- An enhanced Interactive Python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions