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

Execution doesn't resolve unless the file is saved #53

Closed
willwhitney opened this issue Jun 8, 2015 · 14 comments
Closed

Execution doesn't resolve unless the file is saved #53

willwhitney opened this issue Jun 8, 2015 · 14 comments

Comments

@willwhitney
Copy link
Collaborator

#52

@willwhitney willwhitney added this to the v0.4.0 milestone Jun 8, 2015
@willwhitney
Copy link
Collaborator Author

I can't reproduce this — can anyone give me concrete steps?

@willwhitney willwhitney removed this from the v0.4.0 milestone Jun 15, 2015
@n-riesco
Copy link
Collaborator

I've just checked on a machine with:
IPython 3.0.0
Atom 0.207.0-2337254

and followed the steps:

  • Open Atom (no tabs)
  • Open a Python file, test.py, that contains:
    print "Hello, Jupyter!"
  • Position the cursor at the end of the line and press ctrl-alt-enter
  • The spinner doesn't stop
  • Open a Javascript file, test.js, that contains:
    console.log("Hello, Jupyter!");
  • Position the cursor at the end of the line and press ctrl-alt-enter
  • The spinner doesn't stop
  • Click on the tab for test.py and now it shows
    Hello, Jupyter!
  • Click on the tab for test.js
  • Press ctrl-s, and the spinner stops and shows:
    Hello, Jupyter!
    undefine

@willwhitney
Copy link
Collaborator Author

OK, this definitely doesn't repro on Mac. Can I get you to help track down what's going on?

Here are the logs I see when I follow the steps through running the Python code:

screenshot 2015-06-15 18 10 34

What looks different?

@n-riesco
Copy link
Collaborator

I get some syntax errors in kernel-manager.coffee (I'm using v0.4.0).

Edit: It looks like it dropped my email attachment. Here's the screenshot:

Uploading Screenshot from 2015-06-16 09:13:05.png…

@willwhitney
Copy link
Collaborator Author

Sorry, lost track of this issue. The line causing the error looks like it must be:

languageMappings = JSON.parse atom.config.get('Hydrogen.languageMappings')

What do you have in the the "language mappings" field in the settings?

@n-riesco
Copy link
Collaborator

n-riesco commented Jul 2, 2015

This is what I get in the console, before pressing ctrl-alt-enter:

atom.config.get("Hydrogen.languageMappings")
<- undefined

after pressing ctrl-alt-enter:

atom.config.get("Hydrogen.languageMappings")
<- "{}"

@willwhitney
Copy link
Collaborator Author

I think Atom must have a race condition with getting that set (maybe just on some platforms?).

I'm already doing a check for that, but I'll be a little more careful about it. I'm not sure this is the issue, but we can see if it helps.

Update pushed.

@n-riesco
Copy link
Collaborator

n-riesco commented Jul 2, 2015 via email

@willwhitney
Copy link
Collaborator Author

Cool, no worries. Thanks for the help!

On Thu, Jul 2, 2015 at 4:41 PM Nicolas Riesco notifications@github.com
wrote:

I'm not running the latest atom. I will update and let you know (although
not today).


Reply to this email directly or view it on GitHub
#53 (comment)
.

@n-riesco
Copy link
Collaborator

Finally, I got around testing this issue again. I followed the steps described here; this time using the latest versions:

  • atom v1.0.8
  • hydrogen v0.4.4
  • jupyter v4.0.4
  • ipython v4.0.0
  • ijavascript v5.0.5

The problem is still present, but I've also noticed that the execution also resolves:

  • if I switch tabs
  • or if the folder panel gets updated (e.g. by creating a file using the command line).

I would like to help debug this issue, but I'm not familiar with atom. How do you usually go about debugging issues in hydrogen?

@n-riesco
Copy link
Collaborator

OK, this is how far I've got at the moment:

  1. Hydrogen launches the kernel
  2. Hydrogen invokes kernel.execute
  3. I've confirmed that, at this point, the kernel process:
    • is running
    • receives the execute_request
    • and sends back the expected replies
  4. Despite the kernel having already replied, none of the socket listeners set up by Hydrogen gets invoked.

I don't understand the reason, but it's like if the V8 event loop was paused. The event loop starts working as usual:

  • if I save the file,
  • or if I switch to another tab and then switch back
  • or if I run setImmediate(function{}) in the Javascript console.

@essicolo
Copy link

essicolo commented Dec 6, 2016

Hydrogen works fine with Python, but the spinner lasts forever with R. I'm on Windows 10 with Atom 1.12.6. I have installed version 0.7 of the IRkernel with conda. I have added R to the system path, but I'm not familiar with this. Maybe I did it wrong:

C:\Program Files\R\R-3.3.2\bin\x64

No error message in Atom. Just Hydrogen telling me on start that the Python and R kernels were updated.

@n-riesco
Copy link
Collaborator

@essicolo Since the issue is only with the R kernel, please could you open a new issue? Also could you include a screenshot of the log messages in the dev console (shift-ctrl-i) when the spinner appears?

@n-riesco
Copy link
Collaborator

I'm closing this issue, since it hasn't been seen recently and the last last time that was seen we were using the old zmq.

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

3 participants