Package passes local R-CMD-check but fails on all OS on GitHub Actions - possibly due to test file encoding

Hi folks,

I recently set up a GitHub Action to check my package with use_this::use_github_standard.

The package passes R-CMD-check locally with no Errors, Warnings, or Notes, but it fails on ALL platforms on the GitHub Actions R-CMD-check.

The most recent workflow run is here.

The error seems to come from from running the ss_compile_vemco_data() function in the test helper.R file (line 91).

From what I can tell from the Workflow error message and from experimenting with the code, the issue is from selecting variables with dplyr::contains() near the end of the function (line 175). (The check passes if I use the actual variable name inside dplyr::select(), but I don't want to hard-code the variable names.)

I'm not sure why this is causing an error, because I use similar code in ss_compile_hobo_data() and ss_compile_aquameasure_data() with no issues.

The error MIGHT have something to do the encoding of the csv file that I use for test data for ss_compile_vemco_data(). This csv file is ANSI-encoded (default exported by this particular sensor software), while the test files for the other functions are UTF-8.

Thanks!

Aha! I figured out the problem.

It WAS related to the test data file encoding.

To fix, I had to specify that the encoding is ANSI:
data.table::fread(..., encoding = "Latin-1)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.