DonJayamanne / vscodeJupyter

Jupyter for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=donjayamanne.jupyter
MIT License
334 stars 34 forks source link

<!DOCTYPE HTML> #77

Closed whysorfrans closed 6 years ago

whysorfrans commented 6 years ago

Clicking "Run cell" then new notebook results in

"Error <!DOCTYPE HTML>". 

Environment data

VS Code version: 1.16.1 Jupyter Extension version: 1.1.3 (fresh install) OS and version: Windows 10 Pro 1703

Logs

Output from Jupyter output panel

, (<!DOCTYPE HTML>
<html>

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

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

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

<style type="text/css">
/* disable initial hide */
div#header, div#site {
    display: block;
}
</style>

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

          urlArgs: "v=20170927131350",

          baseUrl: '/static/',
          paths: {
            'auth/js/main': 'auth/js/main.min',
            custom : '/custom',
            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',
            'jquery-ui': 'components/jquery-ui/ui/minified/jquery-ui.min',
            moment: 'components/moment/moment',
            codemirror: 'components/codemirror',
            termjs: 'components/term.js/src/term',
            typeahead: 'components/jquery-typeahead/dist/jquery.typeahead'
          },
      map: { // for backward compatibility
        "*": {
        "jqueryui": "jquery-ui",
        }
      },
          shim: {
            typeahead: {
              deps: ["jquery"],
              exports: "typeahead"
            },
            underscore: {
              exports: '_'
            },
            backbone: {
              deps: ["underscore", "jquery"],
              exports: "Backbone"
            },
            bootstrap: {
              deps: ["jquery"],
              exports: "bootstrap"
            },
            bootstraptour: {
              deps: ["bootstrap"],
              exports: "Tour"
            },
            "jquery-ui": {
              deps: ["jquery"],
              exports: "$"
            }
          },
          waitSeconds: 30,
      });

      require.config({
          map: {
              '*':{
                'contents': 'services/contents',
              }
          }
      });

      define("bootstrap", function () {
          return window.$;
      });

      define("jquery", function () {
          return window.$;
      });

      define("jqueryui", function () {
          return window.$;
      });

      define("jquery-ui", function () {
          return window.$;
      });
      // error-catching custom.js shim.
      define("custom", function (require, exports, module) {
          try {
              var custom = require('custom/custom');
              console.debug('loaded custom.js');
              return custom;
          } catch (e) {
              console.error("error loading custom.js", e);
              return {};
          }
      })
    </script>

</head>

<body class="" >

<noscript>
    <div id='noscript'>
      Jupyter 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="/tree" title='dashboard'><img src='/static/base/images/logo.png?v=7c4597ba713d804995e8f8dad448a397' alt='Jupyter Notebook'/></a></div>

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

</div>

<div id="site">

<div class="error">

    <h1>404 : Not Found</h1>

<p>You are requesting a page that does not exist!</p>

</header>

</div>

</body>

</html>)

Output from Console window (Help->Developer Tools menu)

[C:\Users\Frans\.vscode\extensions\donjayamanne.python-0.7.0]: Command `jupyter.runSelectionLine` appears multiple times in the `commands` section.
extensionService.ts:409 [C:\Users\Frans\.vscode\extensions\donjayamanne.python-0.7.0]: Command `jupyter.execCurrentCell` appears multiple times in the `commands` section.
extensionService.ts:409 [C:\Users\Frans\.vscode\extensions\donjayamanne.python-0.7.0]: Command `jupyter.execCurrentCellAndAdvance` appears multiple times in the `commands` section.
extensionService.ts:409 [C:\Users\Frans\.vscode\extensions\donjayamanne.python-0.7.0]: Command `jupyter.gotToPreviousCell` appears multiple times in the `commands` section.
extensionService.ts:409 [C:\Users\Frans\.vscode\extensions\donjayamanne.python-0.7.0]: Command `jupyter.gotToNextCell` appears multiple times in the `commands` section.
messageService.ts:125 <!DOCTYPE HTML>
<html>

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

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

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

<style type="text/css">
/* disable initial hide */
div#header, div#site {
    display: block;
}
</style>

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

          urlArgs: "v=20170927131350",

          baseUrl: '/static/',
          paths: {
            'auth/js/main': 'auth/js/main.min',
            custom : '/custom',
            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',
            'jquery-ui': 'components/jquery-ui/ui/minified/jquery-ui.min',
            moment: 'components/moment/moment',
            codemirror: 'components/codemirror',
            termjs: 'components/term.js/src/term',
            typeahead: 'components/jquery-typeahead/dist/jquery.typeahead'
          },
      map: { // for backward compatibility
        "*": {
        "jqueryui": "jquery-ui",
        }
      },
          shim: {
            typeahead: {
              deps: ["jquery"],
              exports: "typeahead"
            },
            underscore: {
              exports: '_'
            },
            backbone: {
              deps: ["underscore", "jquery"],
              exports: "Backbone"
            },
            bootstrap: {
              deps: ["jquery"],
              exports: "bootstrap"
            },
            bootstraptour: {
              deps: ["bootstrap"],
              exports: "Tour"
            },
            "jquery-ui": {
              deps: ["jquery"],
              exports: "$"
            }
          },
          waitSeconds: 30,
      });

      require.config({
          map: {
              '*':{
                'contents': 'services/contents',
              }
          }
      });

      define("bootstrap", function () {
          return window.$;
      });

      define("jquery", function () {
          return window.$;
      });

      define("jqueryui", function () {
          return window.$;
      });

      define("jquery-ui", function () {
          return window.$;
      });
      // error-catching custom.js shim.
      define("custom", function (require, exports, module) {
          try {
              var custom = require('custom/custom');
              console.debug('loaded custom.js');
              return custom;
          } catch (e) {
              console.error("error loading custom.js", e);
              return {};
          }
      })
    </script>

</head>

<body class="" >

<noscript>
    <div id='noscript'>
      Jupyter 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="/tree" title='dashboard'><img src='/static/base/images/logo.png?v=7c4597ba713d804995e8f8dad448a397' alt='Jupyter Notebook'/></a></div>

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

</div>

<div id="site">

<div class="error">

    <h1>404 : Not Found</h1>

<p>You are requesting a page that does not exist!</p>

</header>

</div>

</body>

</html>
e.doShow @ messageService.ts:125

Actual behavior

VSCode displays an error

Expected behavior

I was hoping to see something akin to a Jupyter session

Steps to reproduce:

gandhis1 commented 6 years ago

Uninstall everything, starting with the extensions, and then reinstall. That's what worked for me when I got this error.

whysorfrans commented 6 years ago

Everything consisting of ...? VSCode + extensions? Anaconda?

gandhis1 commented 6 years ago

Start with extensions only and if that doesn't fix it go to Vs Code as well.

whysorfrans commented 6 years ago

Uninstalled Jupyter and Python extensions Reinstalled Python extension Now when trying to reinstall Jupyter I get the message that I need to restart Code before reinstalling Jupyter

Edit: restarting windows fixed this

whysorfrans commented 6 years ago

Also strange, when uninstalling extensions a 'reload' button appears, except when uninstalling Python or Jupyter