Failure to link Mathematica
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:
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!
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.
Good morning,
I attempted your solution and something strange is happening. Whenever I add the quotation marks, "C:/Program Files/Wolfram Research/Mathematica/13.3/Mathematica.exe", and then exit out of the settings window, I get the same error message. I then go back into the settings and the front quotation marks remove themselves, and leave only the trailing ones, ex: C:/Program Files/Wolfram Research/Mathematica/13.3/Mathematica.exe".
I have attempted:
- Closing out of settings after inserting the quotes, and re-entering the settings. The front quotes disappear.
- Closing out of settings and attempt to run the code block. I get the same error message as stated previously. As I enter back into the settings the front quotes are removed.
- Closing out of Obsidian, re-loading, and then check the settings. The front quotes are removed when I check the settings..
- Closing out of Obsidian, re-loading, and then run the code. I get the same error message and the front quotes are removed when I check the settings.
- I have attempted changing the codeblock to run as
run-mathematicaas well asmathematicaand all issues still occur.
Let me know if you have any other ideas or require any more specified information. I greatly appreciate the help! -Seth
On Thu, 25 Jan 2024 at 03:01, Tim Wibiral @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/twibiral/obsidian-execute-code/issues/327#issuecomment-1909923534, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEINWH23GCZSU75DCXYWJHDYQI3RDAVCNFSM6AAAAABCJVIN72VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBZHEZDGNJTGQ . You are receiving this because you authored the thread.Message ID: @.***>
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!
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.jsondirectly (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\""
I got the same problem and fixed it using escape character ^ for spaces
example:
E:/Program^ Files/Wolfram^ Research/Wolfram/14.1/math.exe
Results:
I'm yet to find a way to pass the written code to the first command. Hope this helps.