quinnj / Sublime-IJulia

An IJulia Frontend for Sublime Text 3
90 stars 16 forks source link

KeyError: 'data' when opening sumlime-IJulia #82

Open datamut opened 8 years ago

datamut commented 8 years ago

It seems that IJulia kernel does not start properly. I've tried to Pkg.pin IJulia on different versions include v0.2.4, v0.2.5, v1.1.9, v1.1.8, and v1.1.7, and it keeps throw out the same error as below. I tried IJulia in Jupyter, and it works properly.

-----------error traceback below---------- Command Executed: /Applications/Julia-0.4.5.app/Contents/Resources/julia/bin/julia /Users/xxxx/.julia/v0.4/IJulia/src/kernel.jl "/Users/xxxx/Library/Application Support/Sublime Text 3/Packages/User/profile-1.json" Exception in thread Thread-2: Traceback (most recent call last): File "./threading.py", line 901, in _bootstrap_inner File "/Users/xxxx/Library/Application Support/Sublime Text 3/Packages/IJulia/Kernel.py", line 412, in run r = self.handlers.get(m, self.pyin_h)() File "/Users/xxxx/Library/Application Support/Sublime Text 3/Packages/IJulia/Kernel.py", line 378, in stdout_h data = self.get_stdout() File "/Users/xxxx/Library/Application Support/Sublime Text 3/Packages/IJulia/Kernel.py", line 328, in get_stdout data = m.content['data'] KeyError: 'data'

datamut commented 8 years ago

An additional information is that several julia backend processes have been created. I notice this when I opened my Activity Monitor today and found that there were several processes still running.

Andrew-S-Rosen commented 8 years ago

I have found a solution: Open Kernel.py in your IJulia folder within your ST3 packages directory. Edit Line 328 and swap out m.content['data'] with m.content['text'].