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

Log message if jupyter not found instead of json-readtable-error #156

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jjlee
Copy link

@jjlee jjlee commented Feb 3, 2018

To reproduce (from emacs -Q):

  • Without jupyter installed, ensure ob-ipython is installed and (require 'ob-ipython).
  • Open an .org file

Expect: No error

Got: File mode specification error: (json-readtable-error 47)

This makes ob-ipython message rather than fail with a json-readtable-error (whose origin and cause are not so obvious) if auto-configuring jupyter kernels fails because (for example) jupyter is not installed. The message includes both the shell command and the output of that command.

Related to #135 -- I don't think I could say it fixes it because I'm not sure that's a single issue, more of a self-help thread maybe...

The reason I personally want this is that it prevents issues like this, which occur even when the user isn't intending to use ob-ipython at all: syl20bnr/spacemacs#9941

@jjlee jjlee changed the title Jupyter not found Log message if Jupyter not found instead of json-readtable-error Feb 3, 2018
@jjlee jjlee changed the title Log message if Jupyter not found instead of json-readtable-error Log message if jupyter not found instead of json-readtable-error Feb 3, 2018
@nanounanue
Copy link

I just tested, and It still fails with:

executing Ipython code block...
json-read: JSON readtable error

This is from *Messages* buffer

@dcherian
Copy link

dcherian commented Feb 4, 2018

@nanounanue #135 definitely has multiple causes. This seems to fix only one of them.

@jjlee
Copy link
Author

jjlee commented Sep 23, 2018

@dcherian As far as I can tell, all the other cases of json-readtable-error involve using ob-ipython. This particular case happens even if you're not really using ob-ipython, or indeed anything related to python at all, except by virtue of it happening to be loaded. For example, it happens in spacemacs when you load an empty .org file when you have both the python and org layers enabled.

Is it strictly relevant to this github issue that json-readtable-error happens in multiple places? Incidentally, the other cases presumably involve ob-ipython--collect-json to read JSON from a buffer while actually using ob-ipython, this one involves JSON read from shell-command-to-string when you use org. So I think they're fairly distinct issues.

Is there a reason not to merge this?

Can I help get it merged somehow?

I should say, I personally have used ob-ipython and think it's great, and I think it would be nice if random bystanders aren't in danger of being hit by this bug and learn to dislike the library as a repeating nuisance that makes them google and install some software (jupyter) to keep it happy :-(

@jjlee
Copy link
Author

jjlee commented Sep 23, 2018

@nanounanue Exactly what did you test? (I expect you tested a different bug: for example, a bug discussed in #135 maybe?)

@jjlee
Copy link
Author

jjlee commented Sep 23, 2018

I've updated the description to add steps to reproduce.

@jjlee
Copy link
Author

jjlee commented Sep 23, 2018

Note the reason syl20bnr/spacemacs#9941 is closed is that this upstream bug exists.

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

Successfully merging this pull request may close these issues.

None yet

3 participants