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

Error on autocomplete #24

Closed
thomasballinger opened this issue May 2, 2015 · 2 comments
Closed

Error on autocomplete #24

thomasballinger opened this issue May 2, 2015 · 2 comments
Labels

Comments

@thomasballinger
Copy link

I'm not sure I'm using the proper versions of things, but tab completion isn't working for me:

tomb@tom-mba ~$ node --version
v0.12.2
tomb@tom-mba ~$ ijs --version
3.0.0
tomb@tom-mba ~$ ipython --version
3.0.0
tomb@tom-mba ~$ ipython console --kernel js
[ZMQTerminalIPythonApp] CRITICAL | Could not find kernel js
tomb@tom-mba ~$ ipython console --kernel javascript
KERNEL: SHELL_SOCKET: Unhandled message type: history_request
IPython Console 3.0.0

In [1]: a = "asdf"
Out[1]: 'asdf'

In [2]: a.KERNEL: Exception in complete_request handler: TypeError: Cannot read property 'slice' of undefined
    at parseExpression (/usr/local/lib/node_modules/ijavascript/lib/handlers_v4.js:219:26)
    at Kernel.complete_request (/usr/local/lib/node_modules/ijavascript/lib/handlers_v4.js:339:22)
    at Kernel.onShellMessage (/usr/local/lib/node_modules/ijavascript/lib/kernel.js:177:41)
    at emit (events.js:118:17)
    at Socket._flush (/usr/local/lib/node_modules/ijavascript/node_modules/zmq/lib/index.js:543:17)
    at _zmq.onReady (/usr/local/lib/node_modules/ijavascript/node_modules/zmq/lib/index.js:197:12)

@n-riesco n-riesco added the bug label May 3, 2015
@n-riesco
Copy link
Owner

n-riesco commented May 4, 2015

This bug is caused by IJavascript receiving IPython messages in the v5 protocol. I see several options how to proceed:

  1. Implement v5 protocol (this is in my TODO list)
  2. Patch TAB completion to accept both v4.1 and v5 messages (I'm concerned other messages would need patching)
  3. Report this bug to the jupyter-console repository (I've already checked the bug is present in their latest commit; I've checked their protocol adapter doesn't get called)

At the moment, I think option 1 is the safest in terms of using my time effectively.

@n-riesco
Copy link
Owner

n-riesco commented May 6, 2015

The latest commits aren't available on npm yet. If you want to check them out, try:

git clone https://github.com/n-riesco/ijavascript
npm install -g ./ijavascript
ijs --ijs-install-kernel
ipython console --kernel javascript

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

No branches or pull requests

2 participants