Error in names(z) <- w[o] : 'names' attribute [69] must be the same length as the vector [68]
Closed this issue · 4 comments
I keep getting this error whenever the works pull a job from the Redis queue. I thought it might be my foreach function but I get the same error when I run the example code:
Error in names(z) <- w[o] :
'names' attribute [69] must be the same length as the vector [68]
Here is my console output:
Main:
registerDoRedis('works')
getDoParWorkers()
[1] 2
foreach(j=1:10,.combine=sum,.multicombine=TRUE) %dopar% {
- 4*sum((runif(1000000)^2 + runif(1000000)^2)<1)/10000000
- }
[1] "interrupt: \n"
Error in tryCatchOne(expr, names, parentenv, handlers[[1L]]) :
attempt to apply non-function
In addition: Warning message:
In e$fun(obj, substitute(ex), parent.frame(), e$data) :
Queue length off by 10...correcting
Worker:
require('doRedis')
redisWorker('works')
Waiting for doRedis jobs.
Processing job 3 from queue works
Error in names(z) <- w[o] :
'names' attribute [69] must be the same length as the vector [68]
Any foreach function I try results in the same error. I am on OSX.
The problem might be colons in the INFO string returned by Redis. I wrote a patch to rredis whcih appears to fix the problem
Sorry for the latency, just back to work. patcpsc graciously fixed the problem in rredis, which I have merged and am in the process of submitting to CRAN tonight!
In the short term you could install from github with:
install.packages("devtools") # if you dont' already have this
library("devtools")
install_github("rredis","bwlewis",quick=TRUE)
library("rredis")
# ...
Should be on CRAN in a few days. The fixed version on CRAN will be called 1.6.9.
Best,
Bryan
Thanks! It will take me a couple of days to get to this
On 15 Sep 2014, at 11:06 am, B. W. Lewis notifications@github.com wrote:
Sorry for the latency, just back to work. patcpsc graciously fixed the problem in rredis, which I have merged and am in the process of submitting to CRAN tonight!
In the short term you could install from github with:
install.packages("devtools") # if you dont' already have this
library("devtools")
install_github("rredis","bwlewis",quick=TRUE)
library("rredis")...
Should be on CRAN in a few days. The fixed version on CRAN will be called 1.6.9.
Best,
Bryan
—
Reply to this email directly or view it on GitHub.
Thank you Bryan and patcpsc, I am very grateful for this fix!