Hash mismatch

Hi,
Every time I run my code I get the following error, which I did not get before.
Could you please explain why?

“hash mismatch so recompiling; make sure Stan code ends with a blank line”

Thanks

That is not an error, just a message. If your code ends like

model {
  ...
}

then the last line has a } symbol. What you need is a

model {
  ...
}

so that the last line is empty (not even spaces).

It can recompile for other reasons though.

I tried following your advice, but still get the error message before trying to compile anything. Is there anything else that I can do?, I have even tried multiple empty lines without spaces at the end of the Stan code to no avail.

1 Like

@bgoodri I have made the last line empty. but still I am getting that error every time.

Any other solutions for this?

It isn’t an error message, so if you can’t figure out a way around it, it is fine to ignore.

Okay thanks

Is there any bug related to this? Sometimes it starts recompiling every time I run the model. This is not crucial but it’s a bit annoying when we play with fake data.

I would try deleting the .rda file once, recompiling once, and hoping it doesn’t recompile after that.

1 Like