campsych / concerto-platform

Concerto Platform - Open-Source Online Adaptive Testing Platform
https://concertoplatform.com/
Apache License 2.0
150 stars 88 forks source link

Error encountered. Execution halted #179

Closed pabloenlondres closed 6 years ago

pabloenlondres commented 6 years ago

I have installed Concerto on the amazon web server as per the instructions and created a sample CAT test as per the video tutorial, and get this message. What am I doing that's wrong? I tried re-doing the CAT test several times but with no change.

image

shukla-h commented 6 years ago

Hi, This could be due to many different reasons. Its most likely that one of your node isn't connected to the next one. Other most likely reason could be you may have attached an output from a node into a wrong input node. Please attach a screenshot of the flowchart of your test for a better understanding of your problem.

pabloenlondres commented 6 years ago

Sorry, but I tried it again two further times. I'm doing it exactly as in the tutorial. Nodes are connected properly as you can see below. Grateful for a speedier response

image

shukla-h commented 6 years ago

Hi looking at your original post image it looks like these seems to be an issue with the stylesheet. You can try running it without the template defination. Also this time take a screenshot of the whole debugger. As I can only see it partially.

przemyslawlis commented 6 years ago

Run test in "debug" mode (click debug button), and paste content of javascript console. See Reporting Issues for more info.

nsr7580 commented 6 years ago

I am seeing similar error. This is the content of the javascript console.

<simpleError in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = default.stringsAsFactors()) { data.row.names <- if (check.rows && is.null(row.names)) function(current, new, i) { if (is.character(current)) new <- as.character(new) if (is.character(new)) current <- as.character(current) if (anyDuplicated(new)) return(current) if (is.null(current)) return(new) if (all(current == new) || all(current == "")) return(new) stop(gettextf("mismatch of row names in arguments of 'data.frame', item %d", i), domain = NA) } else function(current, new, i) { if (is.null(current)) { if (anyDuplicated(new)) { warning(gettextf("some row.names duplicated: %s --> row.names NOT used", paste(which(duplicated(new)), collapse = ",")), domain = NA) current } else new } else current } object <- as.list(substitute(list(...)))[-1L] mirn <- missing(row.names) mrn <- is.null(row.names) x <- list(...) n <- length(x) if (n < 1L) { if (!mrn) { if (is.object(row.names) || !is.integer(row.names)) row.names <- as.character(row.names) if (anyNA(row.names)) stop("row names contain missing values") if (anyDuplicated(row.names)) stop(gettextf("duplicate row.names: %s", paste(unique(row.names[duplicated(row.names)]), collapse = ", ")), domain = NA) } else row.names <- integer() return(structure(list(), names = character(), row.names = row.names, class = "data.frame")) } vnames <- names(x) if (length(vnames) != n) vnames <- character(n) no.vn <- !nzchar(vnames) vlist <- vnames <- as.list(vnames) nrows <- ncols <- integer(n) for (i in seq_len(n)) { xi <- if (is.character(x[[i]]) || is.list(x[[i]])) as.data.frame(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) else as.data.frame(x[[i]], optional = TRUE) nrows[i] <- .row_names_info(xi) ncols[i] <- length(xi) namesi <- names(xi) if (ncols[i] > 1L) { if (length(namesi) == 0L) namesi <- seq_len(ncols[i]) vnames[[i]] <- if (no.vn[i]) namesi else paste(vnames[[i]], namesi, sep = ".") } else if (length(namesi)) { vnames[[i]] <- namesi } else if (fix.empty.names && no.vn[[i]]) { tmpname <- deparse(object[[i]], nlines = 1L)[1L] if (substr(tmpname, 1L, 2L) == "I(") { ntmpn <- nchar(tmpname, "c") if (substr(tmpname, ntmpn, ntmpn) == ")") tmpname <- substr(tmpname, 3L, ntmpn - 1L) } vnames[[i]] <- tmpname } if (mirn && nrows[i] > 0L) { rowsi <- attr(xi, "row.names") if (any(nzchar(rowsi))) row.names <- data.row.names(row.names, rowsi, i) } nrows[i] <- abs(nrows[i]) vlist[[i]] <- xi } nr <- max(nrows) for (i in seq_len(n)[nrows < nr]) { xi <- vlist[[i]] if (nrows[i] > 0L && (nr%%nrows[i] == 0L)) { xi <- unclass(xi) fixed <- TRUE for (j in seq_along(xi)) { xi1 <- xi[[j]] if (is.vector(xi1) || is.factor(xi1)) xi[[j]] <- rep(xi1, length.out = nr) else if (is.character(xi1) && inherits(xi1, "AsIs")) xi[[j]] <- structure(rep(xi1, length.out = nr), class = class(xi1)) else if (inherits(xi1, "Date") || inherits(xi1, "POSIXct")) xi[[j]] <- rep(xi1, length.out = nr) else { fixed <- FALSE break } } if (fixed) { vlist[[i]] <- xi next } } stop(gettextf("arguments imply differing number of rows: %s", paste(unique(nrows), collapse = ", ")), domain = NA) } value <- unlist(vlist, recursive = FALSE, use.names = FALSE) vnames <- unlist(vnames[ncols > 0L]) if (fix.empty.names && any(noname <- !nzchar(vnames))) vnames[noname] <- paste("Var", seq_along(vnames), sep = ".")[noname] if (check.names) { if (fix.empty.names) vnames <- make.names(vnames, unique = TRUE) else { nz <- nzchar(vnames) vnames[nz] <- make.names(vnames[nz], unique = TRUE) } } names(value) <- vnames if (!mrn) { if (length(row.names) == 1L && nr != 1L) { if (is.character(row.names)) row.names <- match(row.names, vnames, 0L) if (length(row.names) != 1L || row.names < 1L || row.names > length(vnames)) stop("'row.names' should specify one of the variables") i <- row.names row.names <- value[[i]] value <- value[-i] } else if (!is.null(row.names) && length(row.names) != nr) stop("row names supplied are of the wrong length") } else if (!is.null(row.names) && length(row.names) != nr) { warning("row names were found from a short variable and have been discarded") row.names <- NULL } if (is.null(row.names)) row.names <- .set_row_names(nr) else { if (is.object(row.names) || !is.integer(row.names)) row.names <- as.character(row.names) if (anyNA(row.names)) stop("row names contain missing values") if (anyDuplicated(row.names)) stop(gettextf("duplicate row.names: %s", paste(unique(row.names[duplicated(row.names)]), collapse = ", ")), domain = NA) } attr(value, "row.names") <- row.names attr(value, "class") <- "data.frame" value})(id = "1", question = "10+10", response_options = "[{\"value\":\"20\",\"label\":\"20\"},{\"value\":\"40\",\"label\":\"40\"}]", a = "1.7", b = "-2", c = "0", d = "1", correct = "20", cb_group = "mathematics", fixed_index = NULL, check.names = FALSE, fix.empty.names = TRUE, stringsAsFactors = FALSE): arguments imply differing number of rows: 1, 0>

przemyslawlis commented 6 years ago

First of all, Iet's make sure that you're on the latest version of Concerto Platform and starter content itself.

Please see this guide for recommended method of installing up to date version: docker-compose installation guide

Please install latest version and do not import your current (possibly outdated) test there, try to recreate it using updated starter content (it's installed automatically using method above). Please report back if you still have the same issue.

nsr7580 commented 6 years ago

Thanks for reply. I am still having this issue. I am trying the step by step instruction as in the installation guide. I also tried to download Git binary, install and still have issue. polyCat works, just not CAT.

nsr7580 commented 6 years ago

This is the message I see in error logs :

Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 1, 0

przemyslawlis commented 6 years ago

Please export your test and send it to me. I'll try to recreate it locally.

przemyslawlis commented 6 years ago

I've just pushed 1ee3da9f3b4285d4df5aac5a5006647bca85457d to master that CAT node default settings that were causing issues.

If possible recreate your instance with clean database and it will automatically import latest starter content.

TheArcalian commented 6 years ago

I'm having the same issue as nsr7580 on a new instance (v5.0.beta.7.2).

@nsr7580 Did you get it working?

Resolved Issue was with importing tests created in previous version. Convert overwrote the starter content back to previous version. Fresh instance without importing broken tests worked fine.