NEONScience / NEON-utilities

Utilities and scripts for working with NEON data. Currently: an R package with functions to join (stack) the month-by-site files in downloaded NEON data, to convert data to geoCSV format, and to download data from the API.
GNU Affero General Public License v3.0
57 stars 36 forks source link

loadByProduct error when requesting Tick data at all sites (DP1.10093.001) #94

Closed WynneMoss closed 4 years ago

WynneMoss commented 4 years ago

Function loadByProduct; data product DP1.10093.001

Describe the bug Using loadByProduct to download Tick data (DP1.10093.001) results in an error when trying to download all sites. The error seems to occur after stacking, as it reports that stacking finished.

The error is:

Error in list.files(folder, full.names = TRUE, pattern = zipPattern) : assertion 'tree->num_tags == num_tags' failed in executing regexp: file '../../../../../R-3.6.1/src/extra/tre/tre-compile.c', line 634

The error does not occur when downloading only a subset of sites, or downloading all sites of other data products.

To Reproduce

Tick_all <- neonUtilities::loadByProduct(dpID = "DP1.10093.001", check.size = F)

Expected behavior Should download and stack data. The following code work as expected:

downloading all sites, other data: plant <- neonUtilities::loadByProduct(dpID = "DP1.10058.001", check.size = F) downloading tick data, specified sites:

Tick_test <- neonUtilities::loadByProduct(dpID ='DP1.10093.001', site = c("HARV", "BLAN"), check.size = F)

System (please complete the following information):

Additional context It seems like this might relate to the latest data release, as there were no errors with the same package version about 2 weeks ago.

cklunch commented 4 years ago

@WynneMoss Yep, this is an error in version 1.3.5. It happens when a large number of site by month files are stacked - I haven't determined the exact number, but I think somewhere around 500-600 site-months.

It's fixed in the version currently on GitHub. I still have several other updates to make before I send 1.3.6 to CRAN, but for now you can install from here to get around this bug. I'll comment and close this issue when it goes to CRAN. Thanks!

WynneMoss commented 4 years ago

Thanks @cklunch! Github version of the function is working.

cklunch commented 4 years ago

@WynneMoss Fixed version (1.3.6) is up on CRAN now. Thanks!