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

Issues running notebook #45

Closed
0x0L opened this issue Dec 3, 2013 · 18 comments
Closed

Issues running notebook #45

0x0L opened this issue Dec 3, 2013 · 18 comments

Comments

@0x0L
Copy link

0x0L commented Dec 3, 2013

Hi,

First, many thanks for this project.

I'm running into issues when using the default port 8778 for IHaskell notebooks. If I comment that line the config_notebook.py, it runs fine. Basically, the notebook refuses to work on any port other than 8888: the cells are never evaluated (ie stay with a *)

Any idea what could be going wrong ?

@gibiansky
Copy link
Member

Sorry it's taken me a while to respond... but I briefly looked into things and didn't find any reason that might happen. FYI, a * just means the kernel (IHaskell) probably crashed for some reason.

I'll give this a shot on a different setup soon and see if I can reproduce it.

@0x0L
Copy link
Author

0x0L commented Dec 11, 2013

Well it was a bit strange since the console log window was displaying "Kernel heartbeat" or something similar. And it works fine on port 8888. Maybe that's an issue with my local config.

Btw do you plan to add support for ghci custom commands (:kind, :type, :hoogle...) ?

@gibiansky
Copy link
Member

Yes. :type and such already work, and we plan on adding the rest.

@0x0L
Copy link
Author

0x0L commented Dec 11, 2013

Yeah :type works.

I guess I'll close this issue since I guess I'm the only one having it ;)

@0x0L 0x0L closed this as completed Dec 11, 2013
@jcurbo
Copy link

jcurbo commented Dec 11, 2013

Sorry for not commenting until now, but I was having the exact same issue. Just haven't had time to dig into it. I didn't see any error messages in the kernel window, just the "Connecting to: tcp://..." messages whenever I tried to evaluate a cell. I can provide more details if necessary.

@0x0L 0x0L reopened this Dec 11, 2013
@0x0L 0x0L mentioned this issue Dec 11, 2013
@gibiansky
Copy link
Member

@jcurbo @X01 I've played around with this some more and cannot get it to happen.

More importantly, that port has nothing to do with the IHaskell kernel - it's just the HTTP port that the notebook server is running on. That is handled entirely by IPython, so the port should not in any way be affected by IHaskell, as that is just a kernel behind IPython.

I suspect that means this is some sort of bug with IPython? If you'd like to check, you should go into ipython_config.py and comment out this line:

c.KernelManager.kernel_cmd = [exe, 'kernel', '{connection_file}']

That forces IPython to resort to normal IPython kernels instead of IHaskell. If you have the same problem when you change it in that way, this is an IPython bug, and you should close this issue; if you don't, let me know, because that'd be really strange...

@0x0L
Copy link
Author

0x0L commented Dec 13, 2013

@gibiansky

After commenting out the line I can't see anything in the notebook. With --debug flag I can see that the reply from the kernel but nothing appears in the notebook. (whether on default port or not)

And now I can't get it to run on port 8888 either :)

@gibiansky
Copy link
Member

Does the normal IPython notebook work? (Via ipython notebook) You can throw some Python code at it and see what happens (print "Hello")

@0x0L
Copy link
Author

0x0L commented Dec 13, 2013

Well yes and no.... I had to open a new incognito window. Natural suspect would be javascript then

@gibiansky
Copy link
Member

Huh. ...does IHaskell work in an incognito window?

@0x0L
Copy link
Author

0x0L commented Dec 13, 2013

Nope :)
In fact I started by opening a ticket on ipython/ipython, then realize ipython seemed to be ok
I'm as puzzled as you are

@gibiansky
Copy link
Member

Try getting IHaskell from the repo again. Make sure to cabal clean and reinstall. I'm currently testing from the following IPython branch:

https://github.com/ivanov/ipython/tree/console-display-text

(It has some fixes for IHaskell console)

Running everything in incognito, what happens with ipython notebook? What about ipython notebook --profile haskell? What about IHaskell notebook?

Potentially useful output:

  1. Contents of the config files in ~/.ipython/profile_haskell
  2. Output IHaskell setup and other IHaskell calls
  3. Output of cabal configure and cabal install

Hopefully we can figure out what's going on... I'm really confused, and don't really understand how IHaskell could be affecting IPython in this manner. Looks like a bug somewhere, though hard to tell where...

Finally, does IHaskell console work as expected?

@0x0L
Copy link
Author

0x0L commented Dec 13, 2013

Recompiled and I can't get the console to work:
IHaskell: attempting to use modulemain:IHaskell.Types' (./IHaskell/Types.hs) which is not loaded`

Well, since the javascript from IHaskell also affected IPython notebooks, I really think there something wrong in there. Either in IHaskell's or in IPy base js

@gibiansky
Copy link
Member

You can't run ihaskell in the same directory as the sources, sadly.

@gibiansky
Copy link
Member

JavaScript from the Haskell profile doesn't affect the ipython native
python notebook

@0x0L
Copy link
Author

0x0L commented Dec 13, 2013

JavaScript from the Haskell profile doesn't affect the ipython native

Well, it did, through the cache (see ipython/ipython#4626)

You can't run ihaskell in the same directory as the sources, sadly.

Running from another dir, the prompt appears but I never get an answer (it worked previously in the console)

In [1]: print "fdsf"

In [2]:
Do you really want to exit ([y]/n)? y

(running with --debug flag)

btw the kernel is not killed on exit

@gibiansky
Copy link
Member

For ihaskell console to work, you must be on the github branch linked above.

And yes, caching makes sense...

And yeah, console doesn't kill the kernel properly: updated IPython fixes
this.
On Dec 12, 2013 7:59 PM, "x0l" notifications@github.com wrote:

JavaScript from the Haskell profile doesn't affect the ipython native
Well, it did, through the cache.

You can't run ihaskell in the same directory as the sources, sadly.
Running from another dir, the prompt appears but I never get an answer:

In [1]: print "fdsf"

In [2]:
Do you really want to exit ([y]/n)? y

btw the kernel is not killed on exit


Reply to this email directly or view it on GitHubhttps://github.com//issues/45#issuecomment-30484787
.

@0x0L
Copy link
Author

0x0L commented Dec 13, 2013

For ihaskell console to work, you must be on the github branch linked above.

Oopps... Sorry for that :)
Now both IPy and IHaskell notebooks work fine on their default ports (and using zmq4)

Maybe they've changed something in the tornado caching policy, this would explain why custom.js from ihaskell got loaded into ipy notebooks.

Anyhow, thank you very much for helping me out and for this project: I now have a decent place where to learn and experiment with Haskell !

@0x0L 0x0L closed this as completed Dec 13, 2013
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