jupyter / help

:sparkles: Need some help or have some questions? Please visit our Discourse page.
https://discourse.jupyter.org
291 stars 97 forks source link

Jupyter not rendering/displaying in Chrome/Internet Explorer/Edge browser in Windows 10. #546

Closed saumickm closed 5 years ago

saumickm commented 5 years ago

I'm trying to open Jupyter but its not displaying in any of the browsers, when I open console it states "blocked due to mime type mismatch". Here's how the errors in the console looks like. Errors

EloyRD commented 5 years ago

I had the same problem #545.

This issue is related to https://github.com/jupyter/notebook/issues/4469. The PR on https://github.com/jupyter/notebook/pull/4468 solves the issue. You look for the file notebookapp.py and add the new line.

saumickm commented 5 years ago

Here's what I did, following the instructions here: https://github.com/jupyter/notebook/pull/4468/files to fix the issue: Go to file explorer and search for the file "notebookapp.py". This particular file was here: [C:\Users\\Miniconda3\pkgs\notebook-5.7.6-py36_0\Lib\site-packages\"notebook"] in my case, but this file is always inside the "notebook" directory. There's another file with the same name in the tensorflow directory you don't need to change anything in that. Then open the python file in an Editor

Press Ctrl+F to find the line "def init_mime_overrides(self):" Then delete these two lines :

Tornado uses this when serving .css files, causing browsers to reject the stylesheet.

 # We know the mimetype always needs to be text/css for css

and add,

    # Tornado uses this when serving .css and .js files, causing browsers to
    # reject these files. We know the mimetype always needs to be text/css for css
    # and application/javascript for JS, so we override it here.
    mimetypes.add_type('text/css', '.css')
    mimetypes.add_type('application/javascript', '.js')

make sure the indentation is correct for your editor I recommend typing it for that reason instead of copying it.

Thanks to @EloyRD @ciaranlangton