Skip to content
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

Failure to link Mathematica #327

Open
sethshjandemaar opened this issue Jan 25, 2024 · 4 comments
Open

Failure to link Mathematica #327

sethshjandemaar opened this issue Jan 25, 2024 · 4 comments

Comments

@sethshjandemaar
Copy link

Good afternoon,

Thanks for making this wonderful little plugin. I am having a lot of fun learning how to use it and make my life in obsidian easier. I am fairly code/tech illiterate. I want to link my Mathematica program to Execute Code as well but I am having an issue with linking the Mathematica path to the plugin settings. From the video you have linked on yall's (the one that this plugin was featured in) I was able to link python. When I do the same with Mathematica I receive the following error message when I attempt to run the code:
image

Mathematica is stored locally on my computer and I am attempting to link it to the .exe file. I hope there is not something extremely obvious I am missing. My initial thought is that the folder after the C drive is in fact named 'Program Files' and the code is having a hard time reading the space. When specifying a path is there a character I need to add so it reads the spaces?

Thank you for the help!

@twibiral
Copy link
Owner

Hi, I guess that comes you are right and the problem is because of the space in "C:/Program Files". Try to use quotation marks around the path like this:

"C:/Progam Files/path/to/..."

Please tell me if it works. We will try to fix this Problem in the code.

@sethshjandemaar
Copy link
Author

sethshjandemaar commented Jan 25, 2024 via email

@bvbunnik
Copy link

bvbunnik commented Mar 1, 2024

Can confirm this "bug" I have the same issue with a path to Rscript.
If I try to input "c:\Program Files\R\R-4.1.3\bin\Rscript.exe" it will remove the first quotation mark and change all backslashes in to forward slashes, leaving the last quotation mark upon leaving the settings, i.e.: c:/Program Files/R/R-4.1.3/bin/Rscript.exe"

Some help in this is indeed greatly appreciated!

@JeromeGi
Copy link

I run into the same problem and found a workaround (until a proper fix is implemented):

  • Edit the plugin configuration file .obsidian\plugins\execute-code\data.json directly (preferably while Obsidian is closed).
  • Look for the property corresponding to the language you want to change (for me it was shellPath), and set the value to your executable between escaped double quotes, for example:
    "shellPath": "\"C:/Program Files/path/to/executable.exe\""

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

No branches or pull requests

4 participants