Giter Club home page Giter Club logo

Comments (20)

n-riesco avatar n-riesco commented on June 26, 2024

In the evening, I will try to set up IJavascript on a Windows machine and reproduce this bug.

In the meantime, please, could you post here the output of running:

$ node "C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js"

?

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024

Thanks for the quick response.


$ node "C:\Program Files
(x86)\nodejs\node_modules\ijavascript\lib\kernel.js"
Usage: node kernel.js [--debug] session_working_directory
connection_file
C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js:79
    throw e;
          ^
Error: Error: missing session_working_directory
    at Object.<anonymous> (C:\Program Files
(x86)\nodejs\node_modules\ijavascript\lib\kernel.js:66:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

It looks like you can run the IJavascript kernel from the command line, but not from IPython. I will investigate this further, once I setup IJavascript on a Windows machine.

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

Hi! I couldn't reproduce the same error message, but I found a bug building the path to the kernel folder. I've just released version 5.0.1 that fixes this bug. Please, could you install IJavascript again and check whether this release fixes the issue for you?

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024

I just did a

$ npm install ijavascript

$ ijs

I am getting the same issue as before:

Error: Cannot find module 'C:\Program Files (x86)
odejs
ode_modules\ijavascript\lib\kernel.js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
[W 05:55:14.108 NotebookApp] Timeout waiting for kernel_info reply from 6e44ac95-789b-4636-a3ee-797035bbffb6
[I 05:55:15.936 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 6e44ac95-789b-4636-a3ee-797035bbffb6 restarted
module.js:338
    throw err;

Running outside of ijs, I get

$ node "C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js"
Usage: node kernel.js [--debug] session_working_directory connection_file
C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js:79
    throw e;
          ^
Error: Error: missing session_working_directory
    at Object.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js:66:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

The install command is missing -g. Please, try:

$ npm install -g ijavascript

And to confirm that version 5.0.1 is globally installed, try:

$ npm list -g ijavascript

It should show version 5.0.1

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024

As indicated above, I did install ijavascript, though not globally.

I just used the exact commands you listed above and confirmed that I am indeed using v5.0.1.

Unfortunately, the problem persists.

The following line in the console output is very odd:

Error: Cannot find module 'C:\Program Files (x86)
odejs
ode_modules\ijavascript\lib\kernel.js'

It looks like the path is not being interpreted correctly. As I mentioned initially, could this be a quoting issue?

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

Oh! So the path is actually printed out broken like that?

Could you check for me if the path in the kernel spec file is also broken?
If you run:

$ ipython locate

It should print the IPython folder. Let's say it prints "C:\Users\breisfeld.ipython". Then, the kernel spec should be located in "C:\Users\breisfeld.ipython\kernels\javascript\kernel.json".

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024

This does appear to be broken.

My ipython preferences directory is something like

"C:\Users\USERNAME\AppData\Roaming.ipython"

Within this directory, I do have a "kernels" subdirectory. It contains other kernels I have installed (e.g., julia), but not one for javascript.

I can't find any "...\javascript\kernel.json" on my machine.

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

Just to be clear, when you run ipython locate, what you get is "C:\Users\USERNAME\AppData\Roaming.ipython", isn't it?

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

And one more question: I've noticed you're using IPython 3.1.0, whereas Anaconda 2.1.0 provides IPython 2.2.0. How did you upgrade IPython?

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024
$ ipython locate
C:\Users\USERNAME\AppData\Roaming\.ipython

To update ipython, I believe that I downloaded the wheel from Christoph Gohlke's "Unofficial Windows Binaries for Python Extension Packages" site (http://www.lfd.uci.edu/~gohlke/pythonlibs/) and installed that using

pip install ipython‑3.1.0‑py27‑none‑any.whl

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

And when you run ipython --version from the terminal, what do you get 3.1.0 or 2.2.0?

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024
$ ipython --version
3.1.0

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

I've just updated IJavascript (v5.0.2). Please, could you install IJavascript again, run the following command and post the output here:

$ ijs --ijs-debug --ijs-install-kernel

?

I hope it'll give me a clue to locate the bug.

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024
$ ijs --ijs-debug --ijs-install-kernel
Error: Unrecognised flag '--ijs-install-kernel'

iJavascript Notebook

Usage:

    ijs <options>

The recognised options are:

    --ijs-debug             enable debug log level
    --ijs-help              show this help
    --ijs-working-dir=path  set working directory for Javascript sessions
                            (default = current working directory)

and any other options recognised by the IPython notebook; run:

    ipython notebook --help

for a full list.

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

That output indicates that the IJavascript in your system is version v5.0.0 or earlier.

The easiest way to run IJavascript is when IJavascript has been installed globally:

$ npm install -g ijavascript
$ ijs --ijs-debug --ijs-install-kernel

If you want to install it locally, then running IJavascript requires to include the right path to the local installation:

$ npm install ijavascript
[email protected] ../node_modules/ijavascript
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected])
$ ../node_modules/.bin/ijs --ijs-debug --ijs-install-kernel

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024

Okay. I think I have this working.

I ended up removing my previous ijavascript installations (I had a global and local one) and installed the latest version globally via npm.

Thank you for your help!

from ijavascript.

n-riesco avatar n-riesco commented on June 26, 2024

Does the latest version work for you? Shall I close this bug?

from ijavascript.

breisfeld avatar breisfeld commented on June 26, 2024

Yes and yes.

from ijavascript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.