Skip to content

Coaelscing crash when trying to run to a newly defined stage #59

@peterhurford

Description

@peterhurford

If you run the entire model, then define a new stage, and then run that model to that stage, I get this bug:

Loading model: models/dev/imsurvey
Copying cached environments...
Beginning 3. analyze stage...
  Running 1. num respondents...
Error in `[<-.data.frame`(`*tmp*`, newnames, value = list(p_donate_2014_c = c(0.0961413333333333,  :
  replacement element 1 has 2437 rows, need 3514
In environment imports:Ramd: run("imsurvey", from = "analyze", to = "analyze/member_local_group")
In /Users/peterhurford/.R/.syberia/engines/github/robertzk/modeling.sy/master/config/global/modeling/r
un_model.R:27: invisible(director$cache_set("last_run",
    director$resource(keys[1])$run(..., verbose = verbose))[[1L]])
In package director: self$cache$set(k, v)
In package base: structure(list(value), .Names = key)
In package stagerunner: director$resource(keys[1])$run(..., verbose = verbose)
In package stagerunner: run_stage(..., remember_flag = TRUE)
In package stagerunner: stages[[stage_index]]$run(stage_key[[stage_index]], normalized = TRUE,      ve
rbose = verbose, .depth = .depth + 1, ...)
In package stagerunner: self$.before_env(stage_index)
In package objectdiff: package_function("objectdiff", "force_push")(self$.context, current_commit)
In package objectdiff: replay(env, commit, silent = TRUE)
In package objectdiff: commit[[1]](env)
In package base: Reduce(function(y, w) w(y), funs, z)
In package objectdiff: f(init, x[[i]])
In environment base: w(y)
In package objectdiff: change_patches[[patch]](object[[patch]])
In package base: Reduce(function(y, w) w(y), funs, z)
In package objectdiff: f(init, x[[i]])
In package objectdiff: w(y)
In package base: Reduce(function(y, w) w(y), funs, z)
In package objectdiff: f(init, x[[i]])
In environment base: w(y)
In environment base: `[<-`(`*tmp*`, newnames, value = structure(list(p_donate_2014_c = c(0.09614133333
33333,  NA, NA, 0.04, NA, 0.125, 0.08,  [...]
In package base: `[<-.data.frame`(`*tmp*`, newnames, value = structure(list(p_donate_2014_c = c(0.0961
413333333333,  NA, NA, 0.04, NA, 0. [...]
In package base: stop(sprintf(ngettext(N, "replacement element %d has %d row, need %d",      "replacem
ent element %d has %d rows, need %d [...]

Error:
  replacement element 1 has 2437 rows, need 3514

This goes away when R is restarted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions