Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'replace' of null #14

Open
yossibokorbleile opened this issue Sep 2, 2018 · 6 comments
Open

Comments

@yossibokorbleile
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.30.0 x64
Electron: 2.0.5
OS: Mac OS X 10.13.6
Thrown From: hydrogen-python package 0.0.7

Stack Trace

Uncaught TypeError: Cannot read property 'replace' of null

At /Users/Yossi/.atom/packages/hydrogen-python/lib/main.js:186

TypeError: Cannot read property 'replace' of null
    at PythonKernelMod.execute (/packages/hydrogen-python/lib/main.js:186:17)
    at MiddlewareAdapter.execute (/packages/Hydrogen/lib/kernel.js:149:24)
    at Kernel.execute (/packages/Hydrogen/lib/kernel.js:287:33)
    at Object._createResultBubble (/packages/Hydrogen/lib/main.js:391:12)
    at /packages/Hydrogen/lib/main.js:487:14)
    at /packages/Hydrogen/lib/main.js:488:8
    at arrayEach (/packages/Hydrogen/node_modules/lodash/lodash.js:516:11)
    at Function.forEach (/packages/Hydrogen/node_modules/lodash/lodash.js:9342:14)
    at Object._runAll (/packages/Hydrogen/lib/main.js:482:7)
    at Object.runAll (/packages/Hydrogen/lib/main.js:462:12)
    at HTMLElement.hydrogenRunAll (/packages/Hydrogen/lib/main.js:106:40)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
    at Object.didConfirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:152:35)
    at SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-select-list/src/select-list-view.js:413:26)
    at HTMLDivElement.core:confirm (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-select-list/src/select-list-view.js:118:20)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:110:40)

Commands

  5x -1:14 core:move-down (input.hidden-input)
  3x -1:08.4.0 hydrogen:run-and-move-down (input.hidden-input)
  6x -1:05.6.0 core:move-up (input.hidden-input)
  8x -1:03.6.0 hydrogen:run-and-move-down (input.hidden-input)
     -0:43.4.0 core:select-all (input.hidden-input)
     -0:42.6.0 command-palette:toggle (input.hidden-input)
     -0:41.2.0 core:confirm (input.hidden-input)
     -0:41.1.0 hydrogen:run (input.hidden-input)
     -0:36.5.0 command-palette:toggle (input.hidden-input)
     -0:34.2.0 core:move-down (input.hidden-input)
     -0:33.8.0 core:confirm (input.hidden-input)
     -0:33.8.0 hydrogen:run-all (input.hidden-input)
     -0:15.7.0 command-palette:toggle (input.hidden-input)
  4x -0:13.4.0 core:backspace (input.hidden-input)
     -0:02.4.0 core:confirm (input.hidden-input)
     -0:02.4.0 hydrogen:run-all (input.hidden-input)

Non-Core Packages

atom-clock 0.1.16 
atom-webbrowser 2.1.4 
autocomplete-python 1.10.10 
busy-signal 1.4.3 
Hydrogen 2.5.1 
hydrogen-python 0.0.7 
intentions 1.1.5 
language-latex 1.1.1 
latex-tree 0.3.0 
note-book 0.1.0 
pandoc-convert 1.1.1 
platformio-ide-terminal 2.8.4 
python-tools 0.6.9 
script 3.18.1 
scroll-through-time 0.3.0 
skim-displayline 0.0.1 
teletype 0.13.3 
@nikitakit
Copy link
Owner

Do you have the "Extend Executable Code" setting enabled?

@kylebarron
Copy link

@nikitakit it might be helpful to have a section of the issue template that asks for the enabled settings.

@yossibokorbleile
Copy link
Author

@nikitakit I didn’t the first time, but I enabled the optioned and the issue persists.

@nikitakit
Copy link
Owner

@yossibokor Since you seem to be running into this repeatedly, is there a set of steps I could use to reproduce?

The ideal case would be a snippet/file I could open in a new Atom tab, and instructions on what commands to run that trigger the bug.

phromo added a commit to phromo/hydrogen-python that referenced this issue Oct 31, 2018
@phromo
Copy link

phromo commented Oct 31, 2018

this is due to having empty cells - most commonly obtained through placing a final # %% at the end of the file. I have submitted a PR.

@Ibanaut
Copy link

Ibanaut commented Jan 22, 2019

it also is thrown when only imports are in one cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants