Weird error in R studio console whenever I open up a stan file

Hi all,

I keep getting this weird error when opening up a stan file in R studio. The error repeats itself endlessly if I switch between scripts or stan files in R studio.

sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file

I don’t have any ` in my stan file. Any ideas what’s going on? This seemed to start randomly happening.

Thanks!

1 Like

and maybe is a sign I should finally stop using Rstudio in favor of emacs and the like…

I do not recognize this. Ask on the rstudio Discourse as well. Does it happen only when a stan file is open?

What OS and version are you on? I’ve seen this happen under macintosh systems before.

So far, yes, this only happens when a stan file is open.

I will also ask on Rstudio discourse, thanks!

OS: Catalina, 10.15.7 & Rversion: 4.0.2

I reinstalled Rstudio and it was a few days before this started happening again…

There is an rstudio Stan syntax checker that uses some bit of rstan internally. I think there’s a way to turn syntax checking off. Maybe this helps. Ask on the Rstudio forums about this.

Can you reinstall your rstan?

The current rstan in the background also downloads an updated compiler to check model building against. You can turn this off with rstan_options(javascript = FALSE).

1 Like

Thanks for the suggestions!

I will try reinstalling rstan – nervous after a Catalina snafu, but I know it’s fixed now.

For me, turning off the syntax checker wouldn’t be a permanent solution – it is nice to have it on for a newbie so you know there is an issue with your stan syntax before running models.

2 Likes