Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incorrect error handling for feather and parquet formats #388

@wlandau

Description

@wlandau

Prework

  • Read and agree to the code of conduct and contributing guidelines.
  • Confirm that your issue is most likely a genuine bug in the targets package itself and not a user error, a known limitation, or a bug in another package that targets depends on. For miscellaneous troubleshooting, please post to the discussions instead.
  • If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
  • Post a minimal reproducible example like this one so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.

Description

If feather and parquet targets quit in error, the wrong error message is displayed. This is because of the hard assert_df() in the store_coerce_object() methods of those classes.

Reproducible example

  • Post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.
library(targets)
tar_script(targets::tar_target(x, stop("error message"), format = "feather"))
tar_make()
#> ● run target x
#> ● end pipeline
#> Error : target with format = "feather" must be a data frame.
#> Error: callr subprocess failed: target with format = "feather" must be a data frame.
#> Visit https://books.ropensci.org/targets/debugging.html for debugging advice.

Created on 2021-03-30 by the reprex package (v1.0.0)

Expected result

Should have errored with "error message" and registered x as an errored target.

Diagnostic information

  • A reproducible example.
  • Session info, available through sessionInfo() or reprex(si = TRUE).
  • A stack trace from traceback() or rlang::trace_back().
  • The SHA-1 hash of the GitHub commit of targets currently installed. packageDescription("targets")$GithubSHA1 shows you this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions