Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in readMagpieMZ(fileName, compressed = (fileType == "mz")): File format is newer (v1024) than the formats supported (v1-v6) #154

Open
barracuda156 opened this issue Jul 4, 2023 · 2 comments

Comments

@barracuda156
Copy link

R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)

> library(testthat)
> library(magclass)
> 
> test_check("magclass")
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 731 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-readwritemagpie.R:65:3'): read supports older formats ──────────
Error in `readMagpieMZ(fileName, compressed = (fileType == "mz"))`: File format is newer (v1024) than the formats supported (v1-v6). 
Please update your magclass package to the newest version!
Backtrace:
     ▆
  1. ├─testthat::expect_silent(a <- read.magpie(f1)) at test-readwritemagpie.R:65:2
  2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
  3. │   ├─testthat (local) .capture(...)
  4. │   │ ├─withr::with_output_sink(...)
  5. │   │ │ └─base::force(code)
  6. │   │ ├─base::withCallingHandlers(...)
  7. │   │ └─base::withVisible(code)
  8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  9. └─magclass::read.magpie(f1)
 10.   └─magclass:::readMagpieMZ(fileName, compressed = (fileType == "mz"))

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 731 ]
Error: Test failures
Execution halted

This is v. 6.10.0.

@barracuda156
Copy link
Author

Ok, I have tried 6.10.1 (latest commit from master), and it still fails:

* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’
 ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
       ▆
    1. ├─testthat::expect_silent(a <- read.magpie(f1)) at test-readwritemagpie.R:65:2
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─magclass::read.magpie(f1)
   10.   └─magclass:::readMagpieMZ(fileName, compressed = (fileType == "mz"))
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 735 ]
  Error: Test failures
  Execution halted

@barracuda156
Copy link
Author

@pik-piam Any update on the issue? A few tests still fail:

R version 4.4.0 (2024-04-24) -- "Puppy Cup"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)

> library(testthat)
> library(magclass)
> 
> test_check("magclass")
[ FAIL 3 | WARN 0 | SKIP 0 | PASS 740 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-readwritemagpie.R:65:3'): read supports older formats ──────────
Error in `readMagpieMZ(fileName, compressed = (fileType == "mz"))`: File format is newer (v1024) than the formats supported (v1-v6). 
Please update your magclass package to the newest version!
Backtrace:
     ▆
  1. ├─testthat::expect_silent(a <- read.magpie(f1)) at test-readwritemagpie.R:65:3
  2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
  3. │   ├─testthat (local) .capture(...)
  4. │   │ ├─withr::with_output_sink(...)
  5. │   │ │ └─base::force(code)
  6. │   │ ├─base::withCallingHandlers(...)
  7. │   │ └─base::withVisible(code)
  8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  9. └─magclass::read.magpie(f1)
 10.   └─magclass:::readMagpieMZ(fileName, compressed = (fileType == "mz"))
── Failure ('test-readwritemagpie.R:87:3'): handling of spatial data works ─────
Expected `write.magpie(m10, file.path(td, "test.nc"))` to run without any warnings.
ℹ Actually got a <simpleWarning> with text:
  GDAL Error 4: `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-magclass/R-magclass/work/.tmp/RtmpZYFqNa/test.nc' not recognized as a supported file format.
── Error ('test-readwritemagpie.R:88:3'): handling of spatial data works ───────
Error: [rast] cannot open this file as a SpatRaster: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-magclass/R-magclass/work/.tmp/RtmpZYFqNa/test.nc
Backtrace:
     ▆
  1. ├─testthat::expect_silent(write.magpie(m05, file.path(td, "test.nc"))) at test-readwritemagpie.R:88:3
  2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
  3. │   ├─testthat (local) .capture(...)
  4. │   │ ├─withr::with_output_sink(...)
  5. │   │ │ └─base::force(code)
  6. │   │ ├─base::withCallingHandlers(...)
  7. │   │ └─base::withVisible(code)
  8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  9. └─magclass::write.magpie(m05, file.path(td, "test.nc"))
 10.   ├─magclass:::suppressSpecificWarnings(...)
 11.   │ └─base::withCallingHandlers(...)
 12.   ├─terra::writeCDF(...)
 13.   └─terra::writeCDF(...)
 14.     └─terra (local) .local(x, filename, ...)
 15.       ├─terra::rast(filename)
 16.       └─terra::rast(filename)
 17.         └─terra (local) .local(x, ...)
 18.           └─terra:::messages(r, "rast")
 19.             └─terra:::error(f, x@ptr$getError())

[ FAIL 3 | WARN 0 | SKIP 0 | PASS 740 ]
Error: Test failures
Execution halted

There is also an error in vignettes:

--->  Testing R-magclass
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-magclass/R-magclass/work/magclass" && /opt/local/bin/R CMD check ./magclass_6.13.2.tar.gz --no-manual --no-build-vignettes 
* using log directory ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-magclass/R-magclass/work/magclass/magclass.Rcheck’
* using R version 4.4.0 (2024-04-24)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
    gcc-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
    GNU Fortran (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘magclass/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘magclass’ version ‘6.13.2’
* 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 ‘magclass’ 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 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 ... OK
* checking LazyData ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking R/sysdata.rda ... 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’
 ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
    9. └─magclass::write.magpie(m05, file.path(td, "test.nc"))
   10.   ├─magclass:::suppressSpecificWarnings(...)
   11.   │ └─base::withCallingHandlers(...)
   12.   ├─terra::writeCDF(...)
   13.   └─terra::writeCDF(...)
   14.     └─terra (local) .local(x, filename, ...)
   15.       ├─terra::rast(filename)
   16.       └─terra::rast(filename)
   17.         └─terra (local) .local(x, ...)
   18.           └─terra:::messages(r, "rast")
   19.             └─terra:::error(f, x@ptr$getError())
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 740 ]
  Error: Test failures
  Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking running R code from vignettes ...
  ‘magclass-concept.Rmd’ using ‘UTF-8’... OK
  ‘magclass-expansion.Rmd’ using ‘UTF-8’... failed
  ‘magclass.Rmd’ using ‘UTF-8’... OK
  ‘magclass6.Rmd’ using ‘UTF-8’... OK
 ERROR
Errors in running code in vignettes:
when running code in ‘magclass-expansion.Rmd’
  ...
  AAA.EUR 306419.5  423877.5  562607.3  686632.2  785085.5  853625.1


> options(magclass_setMatching = TRUE)

> head(a * b)

  When sourcing ‘magclass-expansion.R’:
Error:  Identical set names but different content. Correct set names!
Execution halted

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

Status: 2 ERRORs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant