ipeaGIT / geobr

Easy access to official spatial data sets of Brazil in R and Python
https://ipeagit.github.io/geobr/
789 stars 118 forks source link

Error when running vignettes code: `Error: File cached locally seems to be corrupted` #368

Closed barracuda156 closed 2 weeks ago

barracuda156 commented 3 weeks ago
--->  Testing R-geobr
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-geobr/R-geobr/work/geobr" && /opt/local/bin/R CMD check ./geobr_1.9.0.tar.gz --no-manual --no-build-vignettes 
* using log directory ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-geobr/R-geobr/work/geobr/geobr.Rcheck’
* using R version 4.4.1 (2024-06-14)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
    gcc-mp-13 (MacPorts gcc13 13.3.0_0+stdlib_flag) 13.3.0
    GNU Fortran (MacPorts gcc13 13.3.0_0+stdlib_flag) 13.3.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘geobr/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘geobr’ version ‘1.9.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘geobr’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking code files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking whether startup messages can be suppressed ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... NOTE
  Note: found 58 marked UTF-8 strings
* checking LazyData ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking running R code from vignettes ...
  ‘intro_to_geobr.Rmd’ using ‘UTF-8’... failed
 ERROR
Errors in running code in vignettes:
when running code in ‘intro_to_geobr.Rmd’
  ...
    timestamp

> hs <- read_households(year = 2010, showProgress = FALSE)
Downloading data and storing it locally for future use.

  When sourcing ‘intro_to_geobr.R’:
Error: File cached locally seems to be corrupted. Please download it again using 'cache = FALSE'.
Alternatively, you can remove the corrupted file with 'censobr::censobr_cache(delete_file = "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-geobr/R-geobr/work/.home/Library/Caches/org.R-project.R/R/censobr/data_release_v0.3.0/2010_households_v0.3.0.parquet")'
Execution halted

* checking re-building of vignette outputs ... SKIPPED
* DONE

Status: 1 ERROR, 1 NOTE
See
  ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-geobr/R-geobr/work/geobr/geobr.Rcheck/00check.log’
for details.

Command failed:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-geobr/R-geobr/work/geobr" && /opt/local/bin/R CMD check ./geobr_1.9.0.tar.gz --no-manual --no-build-vignettes 
Exit code: 1
Error: Failed to test R-geobr: command execution failed
rafapereirabr commented 2 weeks ago

could you please share the code you used that generated this error?

barracuda156 commented 2 weeks ago

could you please share the code you used that generated this error?

I simply ran sudo port -v test R-geobr (which runs R CMD check).

This assumes MacPorts being installed. For the time-being, I just disabled running vignettes https://github.com/macports/macports-ports/blob/dbbdcdc78b5a09a9141b3f4492c1fba2953b6cf0/R/R-geobr/Portfile#L37

P. S. It is possible that the issue is endianness-related, since we have seen parquet-related code having troubles on BE systems.

rafapereirabr commented 2 weeks ago

{geobr} currently does not work with .parquet files. However, {geobr} does suggest in one vignette the {censobr} package, which uses .parquet files. Perhaps the error is in the {censobr} package?

barracuda156 commented 2 weeks ago

{geobr} currently does not work with .parquet files. However, {geobr} does suggest in one vignette the {censobr} package, which uses .parquet files. Perhaps the error is in the {censobr} package?

The error log above does refer to censobr indeed.

rafapereirabr commented 2 weeks ago

I see you also opened an issue on the {cesobr} repository. Given that this is not an issue with {geobr}, I'm closing this issue here. We can continue discussing this issue in the {cesobr} repository.