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

Jupyter client invalid signature error when running code block #780

Closed
paanvaannd opened this issue May 17, 2017 · 5 comments
Closed

Jupyter client invalid signature error when running code block #780

paanvaannd opened this issue May 17, 2017 · 5 comments

Comments

@paanvaannd
Copy link

paanvaannd commented May 17, 2017

Description:

Trying to run code block results in the following error:

hydrogen_error

It seems that Python 3 is giving the error message (going by the title of the error message popup) yet the error points to Python 2.7 as seen in the information of that message. I'm new to Jupyter and Hydrogen so perhaps I'm missing something obvious. Any help would be much appreciated.

Steps to Reproduce:

  1. Download IPython through pip3 install ipython
  2. Download Jupyter through pip3 install jupyter
  3. Download Hydrogen to Atom
  4. Create a Python code file and try to run a block of code (my code is basically import pandas as pd and dataset = pd.read_csv('NAME_OF_FILE'))
  5. Error window picture above shows up

Versions:

macOS 10.12.5 (Sierra)
Atom version 1.16.0
Hydrogen 1.13.0

Logs:

The following is a direct copy/paste of from the log but it doesn't seem to have been formatted properly, so I include a picture of the relevant portion of the logs after for a cleaner look:

utils.js [sm]:75 Hydrogen: clearBubblesOnRow: 13log @ utils.js [sm]:75clearBubblesOnRow @ main.js [sm]:374_createResultBubble @ main.js [sm]:303createResultBubble @ main.js [sm]:285run @ main.js [sm]:399hydrogenRun @ main.js [sm]:76module.exports.CommandRegistry.handleCommandEvent @ command-registry.coffee:255(anonymous function) @ command-registry.coffee:1module.exports.KeymapManager.dispatchCommandEvent @ keymap-manager.js:599module.exports.KeymapManager.handleKeyboardEvent @ keymap-manager.js:390module.exports.WindowEventHandler.handleDocumentKeyEvent @ window-event-handler.coffee:76(anonymous function) @ window-event-handler.coffee:1
utils.js [sm]:75 Hydrogen: clearBubblesOnRow: 13 ResultView {marker: DisplayMarker, element: div.hydrogen.output-bubble, resultContainer: div.bubble-result-container, errorContainer: div.bubble-error-container, statusContainer: div.bubble-status-container…}_executionCount: null_hasResult: falseelement: div.hydrogen.output-bubbleerrorContainer: div.bubble-error-containermarker: DisplayMarkerresultContainer: div.bubble-result-containerspinner: div.spinnerstatusContainer: div.bubble-status-containertooltips: CompositeDisposable__proto__: ObjectaddCopyTooltip: addCopyTooltip(element)addResult: addResult(result)buildSpinner: buildSpinner()constructor: ResultView(marker)destroy: destroy()getAllText: getAllText()setMultiline: setMultiline(multiline)spin: spin()__proto__: Object__defineGetter__: __defineGetter__()__defineSetter__: __defineSetter__()__lookupGetter__: __lookupGetter__()__lookupSetter__: __lookupSetter__()constructor: Object()hasOwnProperty: hasOwnProperty()isPrototypeOf: isPrototypeOf()propertyIsEnumerable: propertyIsEnumerable()toLocaleString: toLocaleString()toString: toString()valueOf: valueOf()get __proto__: __proto__()set __proto__: __proto__()log @ utils.js [sm]:75(anonymous function) @ main.js [sm]:379(anonymous function) @ lodash.js:4944baseForOwn @ lodash.js:3001(anonymous function) @ lodash.js:4913forEach @ lodash.js:9359clearBubblesOnRow @ main.js [sm]:375_createResultBubble @ main.js [sm]:303createResultBubble @ main.js [sm]:285run @ main.js [sm]:399hydrogenRun @ main.js [sm]:76module.exports.CommandRegistry.handleCommandEvent @ command-registry.coffee:255(anonymous function) @ command-registry.coffee:1module.exports.KeymapManager.dispatchCommandEvent @ keymap-manager.js:599module.exports.KeymapManager.handleKeyboardEvent @ keymap-manager.js:390module.exports.WindowEventHandler.handleDocumentKeyEvent @ window-event-handler.coffee:76(anonymous function) @ window-event-handler.coffee:1
utils.js [sm]:75 Hydrogen: Kernel.execute: # IMPORTS
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

# DATA FRAMES
dataset = pd.read_csv('Data.csv')

hydrogen_error_logs

Should any of these items be expanded for more information, let me know which ones and I will post another image as a reply with the expanded block of the log message.

@lgeiger
Copy link
Member

lgeiger commented May 19, 2017

Woa that's strange, thanks for the detailed bug report. This looks similar to #730.

Could you try running:

pip3 install --upgrade ipykernel
python3 -m ipykernel install --user

@paanvaannd
Copy link
Author

paanvaannd commented May 19, 2017

I was having a lot of issues with Jupyter (couldn't get the notebook to work either) so I figured I'd uninstall Hydrogen and Jupyter and even my Python 3 installation (through Homebrew) and reinstall them all. I did that yesterday. I didn't have time to check whether that solved the issues until just now but everything is working! I don't think it's a Hydrogen issue since Jupyter was also acting up so perhaps it was a Jupyter issue which is why reinstallation helped. If something similar pops up I'll try your suggested commands and see if that helps before reporting another issue.

This is an amazing tool, by the way! I really love it and look forward to its continued development. Hope you have a great week :+)

@lgeiger
Copy link
Member

lgeiger commented May 19, 2017

Thanks! Glad it's working now.

@nikitakit
Copy link
Contributor

@lgeiger I think there is actually an issue in hydrogen, since I have a reliable way of getting this error message.

The steps are:

  1. Make sure no kernel is running
  2. Open a python file and move to some simple line
  3. Execute "Hydrogen: Run" twice in quick succession. I do this by spamming "Shift-Enter" key combo.

On the other hand, if I wait for the first execution of "Hydrogen: Run" to successfully start the kernel and finish executing, then I don't see this error message. (Also, sometimes the steps above give a zmq.error.ZMQError: Address already in use instead)

@BenRussert
Copy link
Member

@nikitakit I 've noticed the issue you are talking about, though it probably deserves it's own issue.

For others trying to reproduce, try @nikitakit's suggestion with a language you have only one kernel for, since the select kernel prompt ( e.g Python 2, Python3) can give enough time to start up thus avoiding the problem.

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

4 participants