SublimeText / Helium

Let Sublime Text talk with Jupyter.
Other
237 stars 15 forks source link

execution is not see #23

Closed ghlian closed 4 years ago

ghlian commented 7 years ago

Hi After installing the package, the connection or other commands are seen but the execution is not seen in hermes by click ctrl+shift+p

ngr-t commented 7 years ago

Did you connect the view to a kernel? If the view is not connected to a kernel, Execute command is not shown.

grahamas commented 7 years ago

I'm having a similar problem. I have connected the view to a kernel, but I don't see an execute command.

When I connect the kernel, I see "Connected view '[view name]' to kernel [hex id]" in the Ctrl+` console, and a Hermes Output view opens.

ngr-t commented 7 years ago

Sorry for inconvenience. I found that 'Execute' command is not enabled when we create a kernel through Hermes. The command is enabled only if we connected to a kernel already exists. I'll fix that.

ngr-t commented 7 years ago

I've released the version that fixed the bug I found. Could you tell me whether the problem is solved after update? Thanks.

grahamas commented 7 years ago

It works now, thank you!

ngr-t commented 7 years ago

@ghlian Could you confirm whether your problem is reproduced?

HenrikEckermann commented 6 years ago

sorry if that is a stupid question but I set everything up as described in the readme: Typed 'jupyter notebook' in mac terminal. Jupyter starts. I put the sever url (http://localhost:8888/) into the prompt when I click connect server. But it does not work. I also tried the direct URL (http://localhost:8888/notebooks/Untitled11.ipynb?kernel_name=python3).

What am I doing wrong?

grahamas commented 6 years ago

Did you start and connect to a kernel after connecting to the server?

HenrikEckermann commented 6 years ago

yeah. I tried to restart and all the options one could imagine when looking at the hermes commands. However, I just saw that the code was send to an open r terminal. When I closed this terminal, the code was instead sent to the terminal from which jupyter notebook is running. Is it because I have 'SendCode' installed? Could that be the problem?

HenrikEckermann commented 6 years ago

@grahamas : Sorry, I missed the part of copying the token as well. Now it works... I guess that I have to create a shortcut myself to execute the code righ?

It seems like with your tool, I am a lot closer to finally finding the setup I want to work with. I only need to figure out how I can optimally mix this with Markdown, so that I can work in a similar way like in Rmarkdown, just with Python or even better multilanguage documents R/Python/Markdown. This then knitr to a word/hmtl/pdf to share with collagues and this would be perfect.

So, thanks for creating this and please keep up the good work. I will report any errors/bug if I will find them!

EDIT: What I noticed so far is that the workflow is often interrupted because of 'lags' . In the terminal I see that the connection had to be restored for example it also mentions buffering:

[I 17:09:27.989 NotebookApp] Adapting to protocol v5.0 for kernel c0e5ca6a-a26f-48aa-b66b-cf1b48a3c721
[I 17:09:27.990 NotebookApp] Restoring connection for c0e5ca6a-a26f-48aa-b66b-cf1b48a3c721:24963c7a705f40e2b69cb6ce51c3e05d
[I 17:09:52.111 NotebookApp] Kernel shutdown: 8270cc13-5913-49b2-9582-787bc4467330
[W 17:10:57.991 NotebookApp] WebSocket ping timeout after 90000 ms.
[I 17:11:02.992 NotebookApp] Starting buffering for c0e5ca6a-a26f-48aa-b66b-cf1b48a3c721:24963c7a705f40e2b69cb6ce51c3e05d

I think that this would distrub workflow when really doing work. Is this something caused my personal setup maybe or did others experience this as well? In this case it was an IRkernel but it also happened that there were lags often when I wanted to execute Python Code...

ngr-t commented 6 years ago

It sounds that pweave will fit your workflow. I myself sometimes use this to write a report.

Also, now rmarkdown can include Python code cell though there there should be some limitation (I'm not sure about the latest version, because these days I don't use R and rmarkdown).

As for lags, sorry for inconvenience. I've known that it cause various problems and I think the priority to solve the problem is high, but I'm very busy these days and it's left.

ngr-t commented 6 years ago

Unfortunately, multi language support in single buffer is not in my scope now. I think the priority to fixing other issues is higher.

HenrikEckermann commented 6 years ago

Thanks for your suggestions. pweave looks indeed interesting. I see that there is support for Atom but interestingly did not yet find support for Sublime...Is this what you currently use more instead of Rmarkdown?

ngr-t commented 6 years ago

Simply because I now use mainly Python, I use pweave more often than Rmarkdown, but, if I were to use R in some project I'll use Rmarkdown. It mainly depends on the code base of each project. However, honestly speaking I don't have so many opportunities to use either of them, because I don't write what they will suit so often.

Twizzledrizzle commented 6 years ago

I am quite new to creating kernels, so probably I am just messing it up!! But any pointers or help would be much appreciated!

I have the same problem of not seeing the execute command after connecting to kernel.

Windows7, sublime text build 3175

When I start the kernel through hermes, the started python instance is black without any info, so I am not sure if it connected correctly.

I have also tried manually starting a kernel python -m ipykernel_launcher and connecting to the created .json file.

this is how my kernel.json looks

{
 "argv": [
  "C:\\.......\\Anaconda64\\python.exe",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python 3",
 "language": "python"
}

Here is the console output

'...\jupyter\kernels\python3\kernel.json(id: 28)'to kernel a37aa97c-f958-468b-8b02-535b59803bf7. {'header': {'version': '5.3', 'session': 'e0fd4686-526944411768944b549c6583', 'username': 'username', 'msg_type': 'status', 'msg_id': 'cb43c0ce-0fdbb6ac8515a66daf99d5d8', 'date': datetime.datetime(2018, 9, 24, 9, 23, 49, 924803, tzinfo=tzutc())}, 'content': {'execution_state': 'starting'}, 'msg_type': 'status', 'parent_header': {}, 'msg_id': 'cb43c0ce-0fdbb6ac8515a66daf99d5d8', 'metadata': {}, 'buffers': []} {'header': {'version': '5.3', 'session': 'e0fd4686-526944411768944b549c6583', 'username': 'username', 'msg_type': 'status', 'msg_id': '33dec008-4331ec659b7732e0f7861295', 'date': datetime.datetime(2018, 9, 24, 9, 23, 49, 925804, tzinfo=tzutc())}, 'content': {'execution_state': 'busy'}, 'msg_type': 'status', 'parent_header': {'version': '5.3', 'session': '0a6d0557-9039924cef327a68d0797d9f', 'username': 'username', 'msg_type': 'kernel_info_request', 'msg_id': 'b9f98df2-67ab55d6a71614593ef9eee7', 'date': datetime.datetime(2018, 9, 24, 9, 23, 47, 263537, tzinfo=tzutc())}, 'msg_id': '33dec008-4331ec659b7732e0f7861295', 'metadata': {}, 'buffers': []} {'header': {'version': '5.3', 'session': 'e0fd4686-526944411768944b549c6583', 'username': 'username', 'msg_type': 'status', 'msg_id': '358be636-3154869e0574993ecf4bcd1b', 'date': datetime.datetime(2018, 9, 24, 9, 23, 49, 927804, tzinfo=tzutc())}, 'content': {'execution_state': 'idle'}, 'msg_type': 'status', 'parent_header': {'version': '5.3', 'session': '0a6d0557-9039924cef327a68d0797d9f', 'username': 'username', 'msg_type': 'kernel_info_request', 'msg_id': 'b9f98df2-67ab55d6a71614593ef9eee7', 'date': datetime.datetime(2018, 9, 24, 9, 23, 47, 263537, tzinfo=tzutc())}, 'msg_id': '358be636-3154869e0574993ecf4bcd1b', 'metadata': {}, 'buffers': []}

PS I also have the paramiko dependency problem reported in another issue, but thought maybe that was unrelated

Twizzledrizzle commented 6 years ago

Bummer, seems I needed to connect again (after using connect to create the python kernel!)

It is working now

pykong commented 4 years ago

This is solved. Closing.