Error in cmdstanr::read_cmdstan_csv for mixed model, Win 10

Hi there.
I’m trying to run the mixed model below using algorithm = “fullrank” with brms. But I receive the following error after sampling initiates:

Warning: Fitting finished unexpectedly! Use the $output() method for more information.

Error in cmdstanr::read_cmdstan_csv(out$output_files(), variables = “”, :
Assertion on ‘files’ failed: No file provided.

mod1 ← brm(dv ~ 1 + (1|j) + (1|p:j) + (1|d) + (1|i:d) + (1|x) +
(1|j:d) + (1|j:i:d) + (1|j:x) + (1|p:j:i:d) +
(1|p:j:d) + (1|p:j:x) + (1|d:x) + (1|i:d:x) +
(1|j:d:x) + (1|j:i:d:x) + (1|p:j:d:x),, cores = 4, refresh = 5,
algorithm = “fullrank”, backend = “cmdstanr”)

I’m using Windows 10 and have updated rstan and brms.
Any thoughts on a remedy would be appreciated.

Please upgrade cmdstanr to the latest Github development version and try again:


There was a bug in cmdstanr connected to reading CSV with fullrank under some conditions.

Hi Rok! Thanks for the reply.
I successfully updated, but sadly the same error still occurs. Any clues for an alternative approach?

Hi @Techno_Viper,

Have you found a solution for this problem? I am currently dealing with the same issue and installing the github development version does not help. Any pointers would be greatly appreciated.

I changed the label on this post to brms in the hopes that some of our brms devs will see this. But seeing as more than half our posts are on brms, I think they’re overwhelmed.


Sorry - still have the problem. Haven’t found a solution yet.

I was having this problem, or something very much like it in Windows 10 only (the same code worked fine in Linux). I eventually solved it with:

read_cmdstan_csv(out$output_files(include_failed = TRUE)) ...

This was happening after calling stan_model$optimize(...), which would occasionally report convergence failure even though it had in fact converged successfully.