-
Notifications
You must be signed in to change notification settings - Fork 1
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
I very much like the purpose of this plug-in #3
Comments
Hi Eric, took me a while to debug! So the quarto doc you share didnt run for me either, while others did. The label needs to be a string, which it is (see the is an e in there) but its not recognised as such by quarto, I think that might actually be a quarto bug so I'll open an issue with quarto and implement a quick patch for Ridian. This leaves R not running. The console is being crowded by to many logs from the autocomplete code, that's totally my fault, ill patch the logging so we can figure out the other issue for you. |
very nice of you to have a look at my dual problems. I'm running fairly new release of Quarto, maybe that's part of the story. Standing by to hear more about the patch to the logging |
for us to confirm the quarto issue is really this issue while we wait for the quarto ppl to respond, can you try and render with "hello" as the label (no quotes)? if that works then i can focus on the other issue |
are the following R packages installed on your machine?
|
note language server is new I hadnt updated the readme.md, just the website. |
No, I was missing I've installed those packages, closed and reopened Obsidian, but still Ridan doesn't run the code chunk when asked. Does it matter if RStudio is running at the same time, I presume Ridian creates a new instance of R for its own purposes. |
yes, I do get autocomplete suggestions in a new chunk that I created within the same Obsidian document. When I hit A side note: Your step 5 about installing packages missed my attention on first reading. This is because it was down below BRAT instructions. My brain shut off when I encountered BRAT instructions because I (incorrectly) assumed everything following that was out-of-date now that the plugin has been approved and BRAT was no longer necessary. Simply my habits as an impatient reader. |
So R works for sure, otherwise there is no autocomplete. can you try and run code that outputs text but not a plot? ‘’’r does it output a result? Can you ask for a help page: ‘’’r typing on my phone these might not be backticks but u think you get the point. |
Thanks this is the info I needed to narrow down where the issue lies, I have a win 11 test setup I can see about reproducing and then fixing the issue. Can you share the other plugins you use, these things can sometimes be plugin conflicts… |
So, I installed those that are available on the plugin "store", simply enabling those on win 11, then disabling and enabling Ridian I cant reproduce your failure. Given many of these plugins aren't on the store (you might have gotten them elsewhere, or they aren't being maintained anymore). I will fix the issue with the autocomplete excessively logging so you can at least see whats going on while the plugin tries to run R code and we can see if there is some kind of Ridian problem I can solve, but I cant realistically test for all possible plugin conflicts. Given R runs, and the autocomplete works, perhaps its some kind of callout (results should be printed to a callout)/code related plugin getting in the way? You can expect the update that fixes the console being flooded to be life before Monday. |
Understand you can't test for all conflicts. My plugin addiction is a bit extreme. I will try to do some plugin pruning at the weekend, and will let you know if there are useful developments. Thanks again for your help. |
hm, so ifyou try to "run" a chunk either with the button or with cntrl-r, what appears in the console? try an make sure your mouse isnt in a chunk so we get all messages without the autocomplete crouding the console. |
So those are other plugin's error, tell you what Ill try to add a log thta checks whether the code actually 1. goes to R and 2. comes back from R to track this bug. |
I pushed a silent update (no new version number) if you delete ad then re-install Ridian there should be better logging, if youd share that wiht me I can determin more precisely where the error arises. |
I take it you mean install the silent version via BRAT? Looking at your repo, I see no new commits since ~0900 this morning. I'll ask brat to install and report back to you. |
Plgins are installed form the releases not the repo (which I just updated) but BRAT should work just as well! In fact BRAT might work batter no idea if the Obsidian plugin repo instantly syncs... |
OK, uninstalled and installed via BRAT; re-configured paths to three executables. Console does now echo considerable R code (too much to fit in a single screen). However, nothing is happening within the Obsidian document; no results of the code chunk is shown. Content of console
when trying to execute this code chunk #| label: 4e074085
cos(pi/2) |
Pleased to see another user has reported this problem; I feel less a fool. Thanks for your time diagnosing this problem. |
No log about trying to produce output after that long log with the r code?! |
That's the end of the log, nothing else. |
Okay, so I apologize for what I am to try and put you trough... could you try an run that R code in your R install? It'll probably give errors because it's being executed in a very unintended way, but one potential issue is that maybe that code somehow isn't as robust as I thought it was! |
Some of the file paths are formatted poorly, I'll def fix those... no idea why my windows just accepts those... |
Happy to help with progress on this. New developmentsRunning Obsidian console code in my R install flagged up a "user error" on my part: I had failed to use double-backslashes in specifying location of executables:
I changed this in Ridian and found new output in the console window (still nothing in output):
|
@MichelNivard Stopping for the night. Let me know how else I can be of assistance tomorrow. |
Okay this is good stuff... the R code runs without further error in R? I'll track down the new console error you got after changing the path. |
no, no further errors |
What just happened? I went looking for the Environment tab, which indeed is present on the right panel (which I never have open). I opened the right panel to see if the tab was present, then used ctrl-r to try to run the chunk again, and this time I met with success: From what I can tell, the Ridian plugin now appears to work as intended. I'm fairly sure I tried it this morning without success; but now (1245) it appears to be happy. Did BRAT do an update while I was working on other things? |
High fives all around! So what I think happens, is there were a few sequential issues we worked out, like fixing paths etc. These eventually reveal a bug in the plugin launch sequence that mean that in very specific obsidian editor states (I.e when the right panels are closed on initial app launch I think) the plugin doesn't register that tab properly and sends R output that way without checking whether there is a tab to receive it. You "solved" the bug by opening the tab... anyway this will mean I can target a full fix that shouldn't land ppl in this particular grey area... |
Goodness, such a tangled set of circumstances leading to the problems. Thanks for your patience and diligence in hunting down the gremlins. |
I write R-code and Quarto documents almost daily. Same for Obsidian; appreciate effort bring them together.
However, I cannot make the plugin work on my Windows 11 machine. I have installed previous versions of the plugin and today installed version 0.1.1. I'm using it with R 4.4.2 and Quarto 1.6.38. I am confident I have properly specified paths (and consulted issue #1 closed two weeks ago.
C:\Program Files\R\R-4.4.2\bin\x64\R.exe
C:\Program Files\quarto\bin\quarto.exe
I don't need htmlwidgets at the moment, so not interested in Pandoc, but have configured it nonetheless
C:\Program Files\Pandoc\pandoc.exe
Working with a simple file with a single code chunk to create a histogram,
![image](https://private-user-images.githubusercontent.com/330744/390725927-ff850eef-1866-4ca4-a139-87d1f79e8568.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MTkyMjQsIm5iZiI6MTczOTkxODkyNCwicGF0aCI6Ii8zMzA3NDQvMzkwNzI1OTI3LWZmODUwZWVmLTE4NjYtNGNhNC1hMTM5LTg3ZDFmNzllODU2OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOFQyMjQ4NDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05Y2MwZmE0NzEwODhhODg3YjAxOTg2M2UzOWU0NjQyMjAxYjc4ODg5NDNjMGIxNTAwZTY4ZGVkMDY4OWE3ODBjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.BQBb34V6bdN9-w5plbvKqbvE5DPXUoovSJ993EcfBQg)
this is what the console shows:
![image](https://private-user-images.githubusercontent.com/330744/390726078-817b9673-bb3f-450b-8ff5-2ffe66c4d099.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MTkyMjQsIm5iZiI6MTczOTkxODkyNCwicGF0aCI6Ii8zMzA3NDQvMzkwNzI2MDc4LTgxN2I5NjczLWJiM2YtNDUwYi04ZmY1LTJmZmU2NmM0ZDA5OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOFQyMjQ4NDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MTAxNGUyNjdkZjkwYzk0ZTY4Njg4YzdiMzljYTc3YjYxZmMxNWJhOTEyYjZmNTVjZWYzOWRiZmMxY2FhZDM1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.g9T0CXlH9vHTz3wNSnl9ZpT8bVRO9iId0C2l21Qy7Pg)
Attempting a Quarto html render of the same file produces this at the console
![image](https://private-user-images.githubusercontent.com/330744/390728253-280eb7d0-8701-4151-b4e3-51bd85989518.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MTkyMjQsIm5iZiI6MTczOTkxODkyNCwicGF0aCI6Ii8zMzA3NDQvMzkwNzI4MjUzLTI4MGViN2QwLTg3MDEtNDE1MS1iNGUzLTUxYmQ4NTk4OTUxOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOFQyMjQ4NDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xOGM4NmU2ZWI4OWFmZGIxNWI0OWFlZDRjMjY4ZjUwM2E4NDhjMGEwMWYzYjUxYWI0OGE4NzdlMDZlNWFiNDgzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.H__tIL7lx-UNuRapXEpKHnSOHVAk_OzIA5rvNLmFMoo)
Below is raw file:
You can see Ridian adds a label to the code chunk, but nothing else.
I appreciate your help.
The text was updated successfully, but these errors were encountered: