vscode-marimo icon indicating copy to clipboard operation
vscode-marimo copied to clipboard

Native VSCode editor does not work

Open ebetica opened this issue 1 year ago • 10 comments

Thanks for all your amazing work on Marimo. I'm so excited to see this replace my jupyter notebooks so I can run typechecking and all the goodness of notebooks with python files :)

I'm running the Native VSCode editor for marimo==0.7.8, all I see is a blank screen that says Loading.

The web app works as expected.

image

ebetica avatar Jul 19 '24 23:07 ebetica

Same thing happens to me on

  • marimo 0.8.0
  • vscode-marimo 0.4.2
  • MacOS Sonoma 14.5
  • VS Code 1.92.2

Here are the output logs:

marimo extension is now active!
[server-manager]: -> tryToRecover()
[editor]: -> tryRecoverTerminal()
[editor]: recovered pid 36589
[Function] -> refresh()
Opened notebook document marimo-notebook
Showing a new marimo notebook
[Function] -> refresh()
Checking server...
[server-manager]: -> start()
[server-manager]: Starting server...
[server-manager]: Finding open port...
[server-manager]: Starting server at port 2719
[editor]: -> executeCommand()
[editor]: recovered terminal
[server-manager]: Recovered terminal
[server-manager]: -> stopServer()
[server-manager]: Stopping server...
[editor]: -> dispose()
[editor]: terminal disposed
[server-manager]: Server started at port 2719

mentoc3000 avatar Aug 20 '24 09:08 mentoc3000

@mscolnick I'm still having this issue with vscode-marimo v0.4.8.

mentoc3000 avatar Nov 20 '24 15:11 mentoc3000

@mentoc3000, do you see any errors in the extension logs?

mscolnick avatar Nov 20 '24 18:11 mscolnick

I do not. Here are my steps to reproduce:

  1. Open empty directory in VS Code
  2. Run command "marimio: Create new marimo notebook"
  3. Name it whatever

I get that loading screen above that never resolves. My logs are below:

2024-11-20 13:52:34.857 [info] marimo extension is now active!
2024-11-20 13:52:34.857 [info] Using interpreter: python
2024-11-20 13:52:34.857 [info] [server-manager]: Could not recover any state
2024-11-20 13:53:02.440 [info] marimo extension is now deactivated!
2024-11-20 13:53:02.440 [info] [server-manager]: Stopping server...
2024-11-20 13:53:02.440 [info] [editor]: terminal disposed
2024-11-20 13:53:02.440 [info] [editor]: terminal disposed
2024-11-20 13:53:03.107 [info] marimo extension is now active!
2024-11-20 13:53:03.107 [info] [server-manager]: Could not recover any state
2024-11-20 13:53:03.671 [info] Opened notebook document marimo-notebook
2024-11-20 13:53:03.671 [info] Showing a new marimo notebook
2024-11-20 13:53:03.736 [info] Checking server...
2024-11-20 13:53:03.736 [info] [server-manager]: Starting server...
2024-11-20 13:53:05.185 [info] Using interpreter: /Users/xxxxxxxxxx/.pyenv/versions/3.11.9/bin/python
2024-11-20 13:53:05.185 [info] Using interpreter: /Users/xxxxxxxxxx/.pyenv/versions/3.11.9/bin/python
2024-11-20 13:53:05.889 [info] Using interpreter: /Users/xxxxxxxxxx/.pyenv/versions/3.11.9/bin/python
2024-11-20 13:53:05.890 [info] [kernel-manager]: notebook closed file:///Users/xxxxxxxxxx/git/sandbox/ghjkhjkl.py
2024-11-20 13:53:05.890 [error] [kernel-manager] No key found in notebook metadata
2024-11-20 13:53:08.189 [info] [server-manager]: Server started at port 2818
2024-11-20 13:53:12.569 [info] Using interpreter: /Users/xxxxxxxxxx/.pyenv/versions/3.11.9/bin/python
2024-11-20 13:53:12.570 [info] Opening existing marimo notebook
2024-11-20 13:53:13.559 [info] Opened notebook document marimo-notebook
2024-11-20 13:53:13.559 [info] Showing a new marimo notebook
2024-11-20 13:53:13.559 [info] Showing a new marimo notebook
2024-11-20 13:53:14.177 [info] Using interpreter: /Users/xxxxxxxxxx/.pyenv/versions/3.11.9/bin/python
2024-11-20 13:53:14.593 [info] Using interpreter: /Users/xxxxxxxxxx/.pyenv/versions/3.11.9/bin/python
2024-11-20 13:53:14.617 [info] Checking server...
2024-11-20 13:53:14.617 [info] [server-manager]: Checking server health...
2024-11-20 13:53:14.661 [warning] Server not healthy. Restarting...
2024-11-20 13:53:14.661 [info] [server-manager]: Stopping server...
2024-11-20 13:53:14.661 [info] [editor]: terminal disposed
2024-11-20 13:53:17.694 [info] [server-manager]: Server started at port 2818
2024-11-20 13:53:30.436 [info] Using interpreter: /Users/xxxxxxxxxx/.pyenv/versions/3.11.9/bin/python

I am able to use the extension to launch the marimo server which I then access via the browser, though.

mentoc3000 avatar Nov 20 '24 18:11 mentoc3000

@mscolnick I am facing the same issue when I attempt to "Open as VSCode Notebook".

2024-11-22 13:50:10.000 [info] Using interpreter: c:\...\Python\python.exe
2024-11-22 13:50:10.005 [info] [kernel-manager]: notebook closed file:///c:\...\/Git/.../mo1.py
2024-11-22 13:50:10.005 [error] [kernel-manager] No key found in notebook metadata
2024-11-22 13:50:10.879 [info] Opening existing marimo notebook
2024-11-22 13:50:10.886 [info] Opened notebook document marimo-notebook
2024-11-22 13:50:10.886 [info] Showing a new marimo notebook
2024-11-22 13:50:10.886 [info] Showing a new marimo notebook
2024-11-22 13:50:11.735 [info] Using interpreter: c:\...\Python\python.exe
2024-11-22 13:50:12.556 [info] Using interpreter: c:\...\Python\python.exe
2024-11-22 13:50:12.558 [info] Checking server...
2024-11-22 13:50:12.558 [info] [server-manager]: Checking server health...
2024-11-22 13:50:12.563 [info] [server-manager]: Server already running at port 2818
2024-11-22 13:50:18.911 [info] Using interpreter: c:\...\Python\python.exe

When I attempt to "Start in marimo editor", the following message appears: Error running command marimo-explorer.edit: fetch failed. This is likely caused by the extension that contributes marimo-explorer.edit.

My marimo version is 0.9.21

cotucotudu avatar Nov 22 '24 10:11 cotucotudu

@mscolnick I face exactly what I described in my previous comment with marimo 0.9.27 :(

cotucotudu avatar Nov 29 '24 12:11 cotucotudu

@mscolnick I propose that this issue be reopened. #41 didn't resolve the issue as far as I can tell.

mentoc3000 avatar Dec 06 '24 19:12 mentoc3000

yup, also still having this issue:

Image

$ /home/gabriel/marimo-env/bin/python -m marimo --version
0.9.34

gabrielgrant avatar Dec 12 '24 00:12 gabrielgrant

Does stopping and restarting the server fix this? Can you verify the server is healthy through the Command Palette marimo: Show marimo status (and the bottom line)

mscolnick avatar Jan 15 '25 03:01 mscolnick

@mscolnick marimo server seems to be running fine -- I'm able to use it through the browser

Image

Not sure if this is actually an issue, but when I try to open the notebook, I see the following output from the marimo extension (Bottom pane > Output > Marimo):

Image

and the following toast message:

Image

gabrielgrant avatar Jan 15 '25 06:01 gabrielgrant

Is this just dead? Does it work for anyone? It has to work for someone right?

jediwarpraptor avatar Jun 20 '25 20:06 jediwarpraptor

@jediwarpraptor and others

We're actively rewriting our extension to provide a native experience for marimo notebooks, similar to what you may be used to when using Jupyter in VS Code. It isn't the most straightforward task because marimo is different from the traditional notebooks that VS Code was designed around, but we're making good progress. We'll write back when our rewrite is ready for testing. In the meantime, we recommend using marimo from the command line (docs). Thanks for your patience!

akshayka avatar Aug 01 '25 22:08 akshayka

Hi, we've launched a new VSCode extension at https://github.com/marimo-team/marimo-lsp (readme). It may mean this issue is resolved or no longer applicable. If the issue still exists, please file the issue on over on the new Issues page.

mscolnick avatar Nov 05 '25 18:11 mscolnick