natverse / neuprintr

R client utilities for interacting with the neuPrint connectome analysis service
http://natverse.org/neuprintr
3 stars 3 forks source link

Bug in neuprint_read_neurons when connectors=FALSE #85

Closed jefferis closed 4 years ago

jefferis commented 4 years ago

Noted by Ildi. Problem is here:

https://github.com/natverse/neuprintr/blob/4daa1af3ddc04677d312dc9ec400dcda3640f8de/R/neurons.R#L153

@alexanderbates for reference & doesn't shortcut like &&. So the second condition is evaluated even when NULL. Which gives a language error equivalent to this:

> if(logical(0)) cat("Hello")
Error in if (logical(0)) cat("Hello") : argument is of length zero

which we don't see because everything is wrapped in tryCatch etc that throw away the error.

jefferis commented 4 years ago

(see also #84)