jupyter / atom-notebook

[Deprecated] Jupyter Notebook, but inside Atom.
MIT License
306 stars 48 forks source link

Uncaught SyntaxError: Unexpected end of input #53

Open lspdv opened 7 years ago

lspdv commented 7 years ago

I have problem with opening .ipynb files in Atom 1.9.7 I had Jupyter notebook installed before trying install it to Atom but only in venv not loval. I've found two different paths to jupyter-notebook in my OS X 10.11.4. After installing to Atom my path isn't default /usr/local/bin/ - there is no jupyter and if I try to set any of these two I've found jupyter (one of them is in Library, second from my venv) -notebook starts in Atom with this error: Also makes me confused why is not jupyter-notebook package in list of packages, cause Atom shows it installed in it. During instalation a went through README step by step

Atom Version: 1.9.7 System: Mac OS X 10.11.4 Thrown From: jupyter-notebook package, v0.0.9

Stack Trace

Uncaught SyntaxError: Unexpected end of input

At file:///Users/gabrieve/Downloads/Atom.app/Contents/Resources/app.asar/static/index.html#%7B%22initialPaths%22%3A%5B%22%2FUsers%2Fgabrieve%2FDesktop%2Fsolved%2Fscripts%2Fpolicy%22%5D%2C%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2FUsers%2Fgabrieve%2FDesktop%2Fsolved%2Fscripts%2Fpolicy%22%2C%22initialLine%22%3Anull%2C%22initialColumn%22%3Anull%2C%22forceAddToWindow%22%3Afalse%7D%5D%2C%22windowInitializationScript%22%3A%22%2FUsers%2Fgabrieve%2FDownloads%2FAtom.app%2FContents%2FResources%2Fapp.asar%2Fsrc%2Finitialize-application-window.js%22%2C%22resourcePath%22%3A%22%2FUsers%2Fgabrieve%2FDownloads%2FAtom.app%2FContents%2FResources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22profileStartup%22%3Afalse%2C%22clearWindowState%22%3Afalse%2C%22env%22%3A%7B%22__CF_USER_TEXT_ENCODING%22%3A%220x7620EE03%3A0x0%3A0x0%22%2C%22TMPDIR%22%3A%22%2Fvar%2Ffolders%2Ffr%2Fhfw0rjvd3n7_3zfp9t6z2vx9v21vh3%2FT%2F%22%2C%22HOME%22%3A%22%2FUsers%2Fgabrieve%22%2C%22SHELL%22%3A%22%2Fbin%2Fbash%22%2C%22SSH_AUTH_SOCK%22%3A%22%2Fprivate%2Ftmp%2Fcom.apple.launchd.6P2lIzKjw7%2FListeners%22%2C%22Apple_PubSub_Socket_Render%22%3A%22%2Fprivate%2Ftmp%2Fcom.apple.launchd.bhVRTAOym6%2FRender%22%2C%22DISPLAY%22%3A%22%2Fprivate%2Ftmp%2Fcom.apple.launchd.DuwZDQKTOs%2Forg.macosforge.xquartz%3A0%22%2C%22PATH%22%3A%22%2Fusr%2Fbin%3A%2Fbin%3A%2Fusr%2Fsbin%3A%2Fsbin%22%2C%22LOGNAME%22%3A%22gabrieve%22%2C%22XPC_SERVICE_NAME%22%3A%22com.apple.xpc.launchd.oneshot.0x10000017.Atom%22%2C%22COMMAND_MODE%22%3A%22unix2003%22%2C%22USER%22%3A%22gabrieve%22%2C%22XPC_FLAGS%22%3A%220x0%22%2C%22GOOGLE_API_KEY%22%3A%22AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q%22%2C%22ATOM_HOME%22%3A%22%2FUsers%2Fgabrieve%2F.atom%22%7D%2C%22appVersion%22%3A%221.9.7%22%2C%22atomHome%22%3A%22%2FUsers%2Fgabrieve%2F.atom%22%7D:1

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at NotebookEditor.parseNotebookFile (/Users/gabrieve/.atom/packages/jupyter-notebook/lib/notebook-editor.js:243:19)
    at NotebookEditor.loadNotebookFile (/Users/gabrieve/.atom/packages/jupyter-notebook/lib/notebook-editor.js:217:29)
    at new NotebookEditor (/Users/gabrieve/.atom/packages/jupyter-notebook/lib/notebook-editor.js:34:12)
    at openURI (/Users/gabrieve/.atom/packages/jupyter-notebook/lib/main.js:90:80)
    at Workspace.module.exports.Workspace.openURIInPane (/Users/gabrieve/Downloads/Atom.app/Contents/Resources/app.asar/src/workspace.js:491:22)
    at Workspace.module.exports.Workspace.open (/Users/gabrieve/Downloads/Atom.app/Contents/Resources/app.asar/src/workspace.js:426:19)
    at TreeView.module.exports.TreeView.entryClicked (/Users/gabrieve/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/tree-view/lib/tree-view.js:473:28)
    at tree-view-file.<anonymous> (/Users/gabrieve/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/tree-view/lib/tree-view.js:184:26)
    at space-pen-div.jQuery.event.dispatch (/Users/gabrieve/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at space-pen-div.elemData.handle (/Users/gabrieve/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

Config

{
  "core": {},
  "jupyter-notebook": {
    "jupyterPath": "~playground/venv/bin"
  }
}

Installed Packages

# User
highlight-selected, v0.11.2 (active)
ink, v0.4.4 (active)
jupyter-notebook, v0.0.9 (active)
lisp-paredit, v0.5.4 (active)
nbviewer, v1.0.2 (inactive)
Parinfer, v1.15.0 (active)
proto-repl-charts, v0.4.0 (active)
set-syntax, v0.3.0 (active)
tool-bar, v1.0.1 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.2 (active)
one-light-ui, v1.3.2 (inactive)
one-dark-syntax, v1.2.0 (active)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.0 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
find-and-replace, v0.198.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.64.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.238.0 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.46.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.98.0 (active)
timecop, v0.33.1 (active)
tree-view, v0.208.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.2 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.22.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.52.0 (active)
language-shellscript, v0.22.3 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.1 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.8 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages
zclandry commented 7 years ago

I am having the same or a similar problem. The following is the error that I see when attempting to open an ipython notebook. I am running Debian Testing.

Atom Version: 1.11.2 Electron Version: 0.37.8 System: Debian GNU/Linux Thrown From: jupyter-notebook package, v0.0.9

Stack Trace

Uncaught SyntaxError: Unexpected end of input

At file:///usr/share/atom/resources/app.asar/static/index.html#%7B%22initialPaths%22%3A%5B%22%2Fhome%2Fzclandry%2Fbioinformatics%2Fproj%2Fsar202%2Fresults%2Fparalog%2Fanalyze%22%5D%2C%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2Fhome%2Fzclandry%2Fbioinformatics%2Fproj%2Fsar202%2Fresults%2Fparalog%2Fanalyze%22%2C%22initialLine%22%3Anull%2C%22initialColumn%22%3Anull%2C%22forceAddToWindow%22%3Afalse%7D%5D%2C%22windowInitializationScript%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%2Fsrc%2Finitialize-application-window.js%22%2C%22resourcePath%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22profileStartup%22%3Afalse%2C%22clearWindowState%22%3Afalse%2C%22env%22%3A%7B%22USER%22%3A%22zclandry%22%2C%22XDG_SEAT%22%3A%22seat0%22%2C%22XDG_SESSION_TYPE%22%3A%22x11%22%2C%22SSH_AGENT_PID%22%3A%221609%22%2C%22HOME%22%3A%22%2Fhome%2Fzclandry%22%2C%22DESKTOP_SESSION%22%3A%22default%22%2C%22GTK_MODULES%22%3A%22gail%3Aatk-bridge%22%2C%22QT_LINUX_ACCESSIBILITY_ALWAYS_ON%22%3A%221%22%2C%22DBUS_SESSION_BUS_ADDRESS%22%3A%22unix%3Aabstract%3D%2Ftmp%2Fdbus-PyBGCmfAM1%2Cguid%3Df231b3da2655e1230419155b581bd451%22%2C%22LOGNAME%22%3A%22zclandry%22%2C%22USERNAME%22%3A%22zclandry%22%2C%22XDG_SESSION_ID%22%3A%222%22%2C%22WINDOWPATH%22%3A%222%22%2C%22PATH%22%3A%22%2Fhome%2Fzclandry%2Fbin%3A%2Fhome%2Fzclandry%2F.local%2Fbin%3A%2Fusr%2Flocal%2Fbin%3A%2Fusr%2Fbin%3A%2Fbin%3A%2Fusr%2Flocal%2Fgames%3A%2Fusr%2Fgames%22%2C%22GDM_LANG%22%3A%22en_US.UTF-8%22%2C%22XDG_RUNTIME_DIR%22%3A%22%2Frun%2Fuser%2F1000%22%2C%22DISPLAY%22%3A%22%3A0%22%2C%22LANG%22%3A%22en_US.UTF-8%22%2C%22XDG_SESSION_DESKTOP%22%3A%22default%22%2C%22XAUTHORITY%22%3A%22%2Frun%2Fuser%2F1000%2Fgdm%2FXauthority%22%2C%22SSH_AUTH_SOCK%22%3A%22%2Frun%2Fuser%2F1000%2Fkeyring%2Fssh%22%2C%22SHELL%22%3A%22%2Fbin%2Fbash%22%2C%22GDMSESSION%22%3A%22default%22%2C%22QT_ACCESSIBILITY%22%3A%221%22%2C%22GPG_AGENT_INFO%22%3A%22%2Frun%2Fuser%2F1000%2Fgnupg%2FS.gpg-agent%3A0%3A1%22%2C%22XDG_VTNR%22%3A%222%22%2C%22PWD%22%3A%22%2Fhome%2Fzclandry%22%2C%22XDG_DATA_DIRS%22%3A%22%2Fusr%2Fshare%2Fgnome%3A%2Fusr%2Flocal%2Fshare%2F%3A%2Fusr%2Fshare%2F%22%2C%22XDG_CURRENT_DESKTOP%22%3A%22GNOME%22%2C%22GNOME_DESKTOP_SESSION_ID%22%3A%22this-is-deprecated%22%2C%22XDG_MENU_PREFIX%22%3A%22gnome-%22%2C%22QT_QPA_PLATFORMTHEME%22%3A%22qgnomeplatform%22%2C%22SESSION_MANAGER%22%3A%22local%2Ficeberg%3A%40%2Ftmp%2F.ICE-unix%2F1549%2Cunix%2Ficeberg%3A%2Ftmp%2F.ICE-unix%2F1549%22%2C%22GIO_LAUNCHED_DESKTOP_FILE%22%3A%22%2Fusr%2Fshare%2Fapplications%2Fatom.desktop%22%2C%22GIO_LAUNCHED_DESKTOP_FILE_PID%22%3A%2211763%22%2C%22GJS_DEBUG_OUTPUT%22%3A%22stderr%22%2C%22GJS_DEBUG_TOPICS%22%3A%22JS%20ERROR%3BJS%20LOG%22%2C%22GOOGLE_API_KEY%22%3A%22AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q%22%2C%22CHROME_DESKTOP%22%3A%22Atom.desktop%22%2C%22ATOM_HOME%22%3A%22%2Fhome%2Fzclandry%2F.atom%22%7D%2C%22appVersion%22%3A%221.11.2%22%2C%22atomHome%22%3A%22%2Fhome%2Fzclandry%2F.atom%22%2C%22shellLoadTime%22%3A662%7D:1

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at NotebookEditor.parseNotebookFile (/home/zclandry/.atom/packages/jupyter-notebook/lib/notebook-editor.js:243:19)
    at NotebookEditor.loadNotebookFile (/home/zclandry/.atom/packages/jupyter-notebook/lib/notebook-editor.js:217:29)
    at new NotebookEditor (/home/zclandry/.atom/packages/jupyter-notebook/lib/notebook-editor.js:34:12)
    at openURI (/home/zclandry/.atom/packages/jupyter-notebook/lib/main.js:90:80)
    at Workspace.module.exports.Workspace.openURIInPane (/usr/share/atom/resources/app.asar/src/workspace.js:502:22)
    at Workspace.module.exports.Workspace.open (/usr/share/atom/resources/app.asar/src/workspace.js:437:19)
    at TreeView.module.exports.TreeView.fileViewEntryClicked (/usr/share/atom/resources/app.asar/node_modules/tree-view/lib/tree-view.js:482:40)
    at TreeView.module.exports.TreeView.entryClicked (/usr/share/atom/resources/app.asar/node_modules/tree-view/lib/tree-view.js:470:14)
    at tree-view-file.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/tree-view/lib/tree-view.js:186:26)
    at space-pen-div.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at space-pen-div.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

Config

{
  "core": {
    "telemetryConsent": "no"
  }
}

Installed Packages

# User
jupyter-notebook, v0.0.9 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.2.0 (inactive)
base16-tomorrow-light-theme, v1.2.0 (inactive)
one-dark-ui, v1.6.0 (active)
one-light-ui, v1.6.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.7.0 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.201.1 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.59.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v1.0.0 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2-hotfix1 (active)
snippets, v1.0.2 (active)
spell-check, v0.68.2 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.101.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.209.3 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages
gnestor commented 7 years ago

This repo is not being actively maintained 🙁 In the meantime, I suggest that you look at hydrogen to run code inline in Atom's text editor, nteract (a new Jupyter notebook client built using Electron, React, Redux, RxJS), Jupyter Notebook, and JupyterLab.

Having said that, nteract is currently extracting its many components into separate packages which will allow them to be reused and assembled to create new apps. When I have the time, I would like to use them to completely refactor this project.