hugetim / nbstata

A Jupyter kernel for Stata built on pystata
https://hugetim.github.io/nbstata/
GNU General Public License v3.0
21 stars 1 forks source link

RStudio + Quarto Error #46

Closed mcfibb closed 1 week ago

mcfibb commented 2 weeks ago

Hi there -- I absolutely love this project. I can get the Jupyter Notebook working via my terminal, and Stata is called just fine there. However, when I try to execute any Stata commands in RStudio, I'm met with the error: /bin/sh: stata: command not found

Any ideas? Screenshot for reference: Screenshot 2024-05-16 at 5 23 46 PM

And perhaps separately, a nbstata.config file wasn't automatically created, and I can't figure out how to get nbstata to recognize it on Jupyter startup (via the terminal). Any ideas for that too?

hugetim commented 2 weeks ago

Code execution in RStudio is a known issue with RStudio. I don't think there's anything this project can do to make it work. See the discussion here: https://github.com/hugetim/nbstata/issues/42

Regarding config files, did you try the --conf-file install option? You can use the %status magic in Jupyter to check the location of the config file, if any. For one thing, the file name should be 'nbstata.conf', not '.config'. In which directory did you create your config file?

mcfibb commented 2 weeks ago

Thanks re: 1.

It was a typo in this ticket. The file is named "nbstata.conf". I installed without specifying a configuration file, thinking that when I launched Jupyter, it would pull from the config file on open. Does the configuration file only work on install?

On Fri, May 17, 2024 at 9:29 AM Tim Huegerich @.***> wrote:

Code execution in RStudio is a known issue with RStudio. I don't think there's anything this project can do to make it work. See the discussion here: #42 https://github.com/hugetim/nbstata/issues/42

Regarding config files, did you try the --conf-file install option https://hugetim.github.io/nbstata/user_guide.html#install-nbstata? You can use the %status magic in Jupyter to check the location of the config file, if any. For one thing, the file name should be 'nbstata.conf', not '.config'. In which directory did you create your config file?

— Reply to this email directly, view it on GitHub https://github.com/hugetim/nbstata/issues/46#issuecomment-2117959863, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIA5CAUHK4FAONKWQJLVLTZCYV7FAVCNFSM6AAAAABH3FO24WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJXHE2TSOBWGM . You are receiving this because you authored the thread.Message ID: @.***>

hugetim commented 2 weeks ago

No, you're right. It should pull from the config file on open. But I'm guessing it's not finding the config file you created. You can rerun the 'install' script with the '--conf-file' option to create a config file in the right place for you.