Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

commands not found #85

Closed
pawelru opened this issue Oct 3, 2022 · 23 comments
Closed

commands not found #85

pawelru opened this issue Oct 3, 2022 · 23 comments

Comments

@pawelru
Copy link

pawelru commented Oct 3, 2022

When trying to render a document I have got an error that command is not found. Actually none of the quarto commands works.

image

and when doing cmd+shift+k
image

I am using:

  • macOS Monterey 12.6
  • Quarto 1.1.251
  • Quarto-vscode v1.43.0

Please let me know if you need something more from my side.

In Rstudio I have everything working so it's VSCode related

@jjallaire
Copy link
Contributor

This would occur if we can't locate Quarto on your system. This might be because Quarto isn't on the PATH or it might be because RStudio is installed i a location we don't expect. If it's not on your PATH then we look in the following locations:

  • Applications/quarto/bin/quarto
  • ${HOME}/Applications/quarto/bin/quarto
  • /Applications/RStudio.app/Contents/MacOS/quarto/bin/quarto

Do you know where Quarto is installed? If not, try executing which quarto from the terminal within RStudio.

@pawelru
Copy link
Author

pawelru commented Oct 3, 2022

Please find it attached

❯ which quarto
/usr/local/bin/quarto

❯ quarto --version
1.1.251

❯ echo $PATH
/usr/local/opt/openssl@3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/quarto/bin:/Users/ruckip/opt/miniconda3/bin:/Users/ruckip/opt/miniconda3/condabin:/usr/local/opt/openssl@3/bin

@jjallaire
Copy link
Contributor

Quarto definitely should be found in this configuration! Although I'll be honest and say that I don't know what else to do here as we explicitly looking in /Applications/quarto/bin and that's where it appears to be on your system.

What is the result if you execute which quarto in the VS Code terminal?

@pawelru
Copy link
Author

pawelru commented Oct 3, 2022

I have the same output from shell terminal, bash terminal, RStudio terminal as well as VSCode terminal.

I have restarted VSCode and now when I do cmd+shift+k then there is an "Activating Extensions..." loader on the bottom-left bar for few seconds and then nothing. For the rest of commands I still got the same:
image

image

@jjallaire
Copy link
Contributor

I'm not sure what's going on then. It seems as Quarto isn't found (meaning either the executable isn't there or it isn't callable/invoke-able).

What is the file extension of the document you are working with?

@pawelru
Copy link
Author

pawelru commented Oct 3, 2022

This is .qmd file that is being correctly identified as a "Quarto" by VSCode
image

As I have everything working in RStudio, it seems that everything is ok with quarto-cli itself. For me the connection between vscode-extension to quarto is somehow broken and I don't know how to check / debug this stuff.

I tried to check my keybord shortcuts:
image
image

This all is a default config and I am not seeing anything suspicious in there.

None of quarto specific commands work for me including even creating a new document which should be quarto-cli independent. When I do cmd+shift+p (View-Command Palette) and then type "quarto.newdocument":
image

How to check what's defined under "quarto.newdocument". Where is global registry of commands so that I can check if it is not missing?

@jjallaire
Copy link
Contributor

If you just type quarto.newDocument in the keybindings view you'll likely see it.

I have no idea what might be amiss here. The commands seem to have been "registered" as per the keybindings UI

@pawelru
Copy link
Author

pawelru commented Oct 3, 2022

So the output is the same as in case of render one. The commend is registered but is not executable.

Looked on SO and I have basically the same issue as described here: https://stackoverflow.com/questions/49534068/command-not-found-in-vscode-extension

However, the top-voted answer is not a root-cause here. I haven't dig any further.

Just curious. I was doing installing everything quarto related today - including this extension. Am I the only one who reports it? Can you please try on your own with the released version and check if you have the same?

@jjallaire
Copy link
Contributor

You are indeed the only one reporting this right now :-(

I reset my system to have all the same versions as you report and things work fine.

I sincerely wish I could do more but it's something peculiar to your environment going on here (as all the paths/versions/etc. seem to line up correctly).

@Bonnevie
Copy link

Bonnevie commented Oct 5, 2022

Just to corroborate, I also have this issue, and it is very recent - I was using quarto + VS code's interactive window just yesterday, but now I'm experiencing quarto.runCurrentCell not found, and the same for all other quarto commands.
Seems I just fixed it while typing this comment though: I am on Ubuntu and previously used the apt package manager to install Quarto which got me version 0.9.598, and now I just manually updated to 1.1.251 and it appears to work again! It was not sufficient to reinstall the extension alone. But since this is the version @pawelru is on, and he already tried a reinstall I guess it might not help him.

@j-winters
Copy link

I duplicated the same issue on my Mac. The issue seems to begin with the Quarto extensions of v1.36.0 and later. When I installed v1.35.0 extension, I was able to render again.

@jjallaire
Copy link
Contributor

Thanks, that stands to be quite helpful! I just did a diff between v1.35.0 and v1.36.0 and didn't see anything that stood out as potentially causing this issue. It would be helpful to know:

(1) Exactly what behavior you are seeing (it is "command not found" or just render appearing not to work)

(2) What version of VS Code you are running

(3) What version of Quarto you see for quarto --version

@pawelru
Copy link
Author

pawelru commented Oct 10, 2022

I duplicated the same issue on my Mac. The issue seems to begin with the Quarto extensions of v1.36.0 and later. When I installed v1.35.0 extension, I was able to render again.

I do confirm the above. Reverting back to v1.35.0 makes everything work and from v1.36.0 it is not working anymore. I haven't changed quarto version itself so it's still 1.1.251

@jjallaire
Copy link
Contributor

Hi there, could you also let me know what version of VS Code you are running? Also, could you try invoking Help -> Toggle Developer Tools and then re-try the Quarto commands? (perhaps you will see some JavaScript errors that are occurring).

@jjallaire
Copy link
Contributor

My best guess at this point is that JavaScript exception is occurring sometime during the middle of Quarto extension initialization which prevents those commands from being registered. Hopefully the Help => Toggle Developer Tools will give us a clue!

@jjallaire
Copy link
Contributor

Just to keep an easily accessible record of it, here are the diffs from 1.35 to 1.36: 5e14c88...9fc7c5a

@pawelru
Copy link
Author

pawelru commented Oct 10, 2022

VSCode version

Version: 1.66.2 (Universal)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:49:20.994Z (6 mos ago)
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Darwin x64 21.6.0

I updated to the newest quarto extension and in the developer tools, before any quarto commands I see the following:

Activating extension 'quarto.quarto' failed: Extension 'quarto.quarto' CANNOT use API proposal: notebookDocumentEvents.
Its package.json#enabledApiProposals-property declares: [] but NOT notebookDocumentEvents.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api quarto.quarto.

How should I understand the above?

(I don't have any other records in the console after running other quarto commands.)

This is missing in v1.35.

@jjallaire
Copy link
Contributor

Okay, we've figured out the problem! You are running version 1.66.2 (which in theory we are compatible with). You can see in this code that we are subscribing to an event that only exists in 1.67:

5e14c88...9fc7c5a#diff-9317a765a7e36179d3a6f2d841bbf7ceaa7449a5beafb1a4812dce59f08fb10dR111-R121

The problem is that that event actually appears to be present in v1.66 but it throws an exception when accessed (which prevents us from further initializing).

I realize that you could mitigate this by just updating VS Code, but If you don't mind I'd love to try to resolve this and publish a new version of the extension to try w/ 1.66. Give me an hour or two and I should be able to get that published so you can test.

@jjallaire
Copy link
Contributor

Okay, this commit should fix the problem: 646c464

This is available now in an updated release (v1.46.0).

Thanks again for your help in diagnosing the problem!

@pawelru
Copy link
Author

pawelru commented Oct 10, 2022

🎉 all working in v1.46 Thank you!

@pawelru pawelru closed this as completed Oct 10, 2022
@ChuliangXiao
Copy link

ChuliangXiao commented Oct 22, 2022

Okay, this commit should fix the problem: 646c464

This is available now in an updated release (v1.46.0).

Thanks again for your help in diagnosing the problem!

I'm having very similar issues as @pawelru did:

  1. Non Run Cell bottom above the code chunk
  2. Top right Render bottom not responding
  3. cmmand + shift + k returning command 'quarto.renderShortcut' not found
    using:
macOS Monterey 12.2.1
Quarto 1.1.251
Quarto-vscode v1.50.0
VSCode: 1.72.2

image

@jjallaire
Copy link
Contributor

Try executing Help => Toggle Developer Tools and see if there are any JavaScript errors which are occurring when the Quarto extension is loaded. You might need to also execute the Developer => Reload Window command to cause the extension to re-initialize.

@ChuliangXiao
Copy link

ChuliangXiao commented Oct 23, 2022

Try executing Help => Toggle Developer Tools and see if there are any JavaScript errors which are occurring when the Quarto extension is loaded. You might need to also execute the Developer => Reload Window command to cause the extension to re-initialize.

It's my mistake. I created quarto/ folder and put example-py.qmd into it. After renaming it to quarto-ex/, all those three issues are gone.
Thank you for your prompt response, JJ.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants