-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
JupyniumStartSync RPC channel closed. Stop sending all notifications. And firefox not waking up #91
Comments
Can you paste the logs found in Usually, firefox has to spawn. Did you install firefox in WSL? from selenium import webdriver
driver = webdriver.Firefox()
driver.get("https://www.selenium.dev/selenium/web/web-form.html") |
The error occurred when running the above code... selenium doesn't seem to be working: `:!python /home/will/Python_Projects/test.py shell returned 1` Logs from |
Can you make sure you can run Selenium in WSL? You probably didn't install firefox inside WSL. |
somehow I just can not make selenium work in my machine...
|
I don't think you're required to set up the profile. Do you use WSL2? I think it won't work on the WSL1. |
I'm using WSL2. I got selenium to work finally in WSL2 Ubuntu ... but not your code. I have to modify the code with the following: (first I delete the profile.ini and all files in from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.firefox.service import Service as FirefoxService
from selenium.webdriver.firefox.options import Options
options = Options()
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
# put the root directory your default profile path here, you can check it by opening Firefox and then pasting 'about:profiles' into the url field
options.add_argument("--profile")
options.add_argument(
"/home/will/snap/firefox/common/.cache/mozilla/firefox/oz07y7iv.default"
)
service = FirefoxService(
executable_path="/snap/bin/geckodriver"
) # specify the path to your geckodriver
driver = webdriver.Firefox(
service=FirefoxService(GeckoDriverManager().install()), options=options
)
# driver = webdriver.Firefox(service=service, options=options)
# driver = webdriver.Firefox()
driver.get("https://www.selenium.dev/selenium/web/web-form.html") |
Now the selenium is working but not the default one... I'm not sure how to make this setting in Jupynium... The original question still remains.... from selenium import webdriver
driver = webdriver.Firefox()
driver.get("https://www.selenium.dev/selenium/web/web-form.html") |
I just tested on WSL2 and the sample script works for me. I installed firefox like this: I downloaded linux geckodriver and put it in And then it works for me. |
Thank you. I purged everything and did what you did in that article and now the selenium works and also the simple code of testing selenium works. However, it opens localhost:8888/nbclassic/tree. It returns 404 not found. Then I ignored it and ran I add The following is the local opts = { noremap = true, silent = true }
-- local term_opts = { silent = true }
-- Shorten function name
local keymap = vim.keymap.set
-- Press jk fast to exit insert mode
keymap("n", "<F1>", ':JupyniumStartAndAttachToServer<CR>', opts)
keymap("n", "<F2>", ':JupyniumStartSync<CR>', opts)
local M = {
"kiyoon/jupynium.nvim",
enabled = true,
build = "conda run --no-capture-output -n base pip install .",
cmd = { "JupyniumStartAndAttachToServer", "JupyniumAttachToServer" },
}
function M.config()
require("jupynium").setup({
python_host = { "conda", "run", "--no-capture-output", "-n", "base", "python" },
default_notebook_URL = "localhost:8888",
jupyter_command = "jupyter",
auto_start_server = {
enable = false,
file_pattern = { "*.ju.*" },
},
-- Attach current nvim to the Jupynium server
-- Without this step, you can't use :JupyniumStartSync
-- Related command :JupyniumAttachToServer
auto_attach_to_server = {
enable = false,
file_pattern = { "*.ju.*" },
},
-- Automatically open an Untitled.ipynb file on Notebook
-- when you open a .ju.py file on nvim.
-- Related command :JupyniumStartSync
auto_start_sync = {
enable = false,
file_pattern = { "*.ju.*" },
},
-- Automatically keep filename.ipynb copy of filename.ju.py
-- by downloading from the Jupyter Notebook server.
-- This will overwrite the file without asking
-- Related command :JupyniumDownloadIpynb
auto_download_ipynb = true,
-- Always scroll to the current cell.
-- Related command :JupyniumScrollToCell
autoscroll = {
enable = true,
mode = "always", -- "always" or "invisible"
cell = {
top_margin_percent = 20,
},
},
use_default_keybindings = false,
textobjects = {
use_default_keybindings = false,
},
syntax_highlight = {
enable = true,
},
-- Dim all cells except the current one
-- Related command :JupyniumShortsightedToggle
shortsighted = false,
})
end
return M
|
You should be able to run Jupyter Notebook inside the WSL2. Is that what you want? |
I want to do what this tool is aimed at aka to use nvim to edit/write ipynb files as shown in the video of the read me. When I open And in this situation, |
What happens if you run Jupyter Notebook in WSL before starting nvim? Simply with command. |
Everything works. It connects to the folder tree and I can select the file I want to edit. I notice that if I remove the |
What do you mean it is not working when you set the default URL in the lua file? Does it still connect to |
This is the log I got running
|
What version is your jupyter notebook? |
6.1.5 |
Can you upgrade your notebook to v7 and install nbclassic?
|
In the lua setting (as shown in previous messages) I set the default URL to localhost:8888 without /nbextension because as the previous message shown, it resulted in errors. I manually checked if I delete the nbextension part, it can connect to the file explorer so I changed the defaut URL but it still opens the default one with /nbextension. I also checked (the notebook version is not 7)
|
I uploaded to jupyter notebook 7. It still does not work. For example, following quick start The log file is here https://1drv.ms/u/s!AsXvmecCr4yegZ0QXVB_k8goxSUo9g?e=Tsp4A2 |
Now your notebook works, but it errors when attaching to the kernel. Check these two.
|
When using terminal to spawn firefox, it works with 2 warnings. When running Using Jupynium, |
In that hanging situation, if I close the firefox window. Everything back to normal. Here are the log I think it's relevant.
|
If I understand correctly, the kernel works with normal firefox. And it works if you open Jupynium with terminal. That's a good news. The problem only occurs when you run without terminal right? Can you install |
No. With terminal, the hanging problem occurs. Without terminal, the connecting error problem is encountered. |
From here, can you open a notebook to see if the kernel gets connected? I feel like your Notebook installation is broken and you're not able to use the kernel. |
This is very strange. But as a last resort, you can leave your notebook open with I think you probably have a different environment (conda, venv etc.) that has a broken jupyter notebook installed. |
@WillWang8216 I have this problem very similar to yours. Did you manage to solve this? |
@Georgebobby Which OS are you using? Can you follow the steps described in this thread?
|
Wow. Soo fast. Thank you for this wonderful project ❤️❤️❤️ I was using oracle linux on oracle VPS and use ssh port forwarding to do some work locally... I'm not sure whether it's the problem of selenium on oracle linux so I deployed another machine running Ubuntu. Still the same.... |
If you want to use remote server, you can port forward the Jupyter Notebook and use it. You need to first open Jupyter Notebook (let's say you can connect it at Second, you set up Jupynium locally on Windows, Mac or Linux. Note that you can also connect to the remote neovim. You can choose to use neovim locally, or connect remotely in the server. However Jupynium must be run locally, so that it will show you the browser locally. |
This is only my speculation, I think the problem is due to the version of the I simply |
@ziontee113 It works on both 6 and 7 but you need to change the URL accordingly, because of the fact that Notebook 7 uses |
Thank you for leaving this issue open, it helped a lot! Edit: I had the same error when I installed firefox from snap store, I fixed it by downloading and installing from their official website with geckodriver. |
Jupynium properly starts the server when I call "JupyniumStartAndAttachToServer/ToServerInTerminal" however I got error 404 after accesing the url, but I've noticed that jupyter notebook uses "localhost:8890/tree" as URL, so after changing the default_notebook_URL line in my config to the one below : default_notebook_URL = "localhost:8890/nbclassic", I got rid of the dreaded 404 😄 |
I might be a late to the party, but I am getting this issue on my system as well, the one in the title, Bit of a context that I think might be relevant : When I opened the file , attached to the server and ran
|
So I restarted my system, deleted the file and created a new one with a new name and same data, and it works again, although I am still suspicious about the RAM thing because it peaked at around 65% this time, without any browser opening at all from the command, and once it opened, it dropped back to around 5% eventually. |
Describe the bug
I'm on Ubuntu WSL using
pip install jupynium
to install jupynium (This does not appear in the doc ... so I'm not sure if it's needed... )I opened a file named
test.ju.py
as suggested in the quick start session and run:JupyniumStartAndAttachToServer
it shows [Jupynium]: Jupynium successfully attached and initialised. Run
:JupyniumStartSync
(also firefox does not spawn...)I did as suggested . Run the command but then I was greeted with
Jupynium : RPC channel closed. Stop sending all notifications.
[Jupynium]: Cancelling sync.....
To Reproduce
Steps to reproduce the behavior:
Expected behavior
after running JupyniumStartAndAttachToServer, firefox windows should show up and then jupyniumstartsync should reflects what is edited in real time.
Output when using
jupynium
commandIf you launch Jupynium server using the command line program, it gives you more helpful logs.
Paste the output here
Output of
jupynium --version
Output of
nvim --version
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: