Hi all, My package has errors on CRAN's Linux and Solaris: https://cran.r-project.org/web/checks/check_results_huxtable.html which I can't reproduce on my local OSX Machine, nor on Linux on Travis. Does anyone have any general hints on how to reproduce and/or debug such errors? Specifically the error relates to a call to openxlsx::saveWorkbook producing a message. openxlsx hasn't changed recently, though. Cheers, David
[R-pkg-devel] How to debug CRAN errors?
11 messages · David Hugh-Jones, William Dunlap, Klaus Schliep +2 more
The complaint
test_check("huxtable")
-- 1. Failure: Data written in appropriate format
(@test-openxlsx.R#101) ------
`openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx", overwrite =
TRUE)` produced messages.
comes from your call to testthat::expect_silent()
test_that("Data written in appropriate format", {
hx <- huxtable(a = 1:2 + 0.5, b = -1:-2 + 0.5, d = letters[1:2],
add_colnames = TRUE)
wb <- as_Workbook(hx)
expect_silent(openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx",
overwrite = TRUE))
Perhaps you should suggest to the authors of testthat that it would be nice
if expect_silent() showed some of the text of the messages, etc., instead
of just saying that messages were produced.
By the way, I think your test test should write to a file in [a
subdirectory of]] tempdir(), not to a file in the current directory.
comes from
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones <davidhughjones at gmail.com>
wrote:
Hi all, My package has errors on CRAN's Linux and Solaris: https://cran.r-project.org/web/checks/check_results_huxtable.html which I can't reproduce on my local OSX Machine, nor on Linux on Travis. Does anyone have any general hints on how to reproduce and/or debug such errors? Specifically the error relates to a call to openxlsx::saveWorkbook producing a message. openxlsx hasn't changed recently, though. Cheers, David [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Hi Bill, I take your point. Meanwhile, though, is there any way to debug the problem? I?ll assume that making repeated uploads to CRAN is not a viable approach.... it would be great if there were a Docker image of their setup available, for example.
On Wed, 13 Mar 2019 at 17:00, William Dunlap <wdunlap at tibco.com> wrote:
The complaint
test_check("huxtable")
-- 1. Failure: Data written in appropriate format
(@test-openxlsx.R#101) ------
`openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx", overwrite =
TRUE)` produced messages.
comes from your call to testthat::expect_silent()
test_that("Data written in appropriate format", {
hx <- huxtable(a = 1:2 + 0.5, b = -1:-2 + 0.5, d = letters[1:2],
add_colnames = TRUE)
wb <- as_Workbook(hx)
expect_silent(openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx",
overwrite = TRUE))
Perhaps you should suggest to the authors of testthat that it would be
nice if expect_silent() showed some of the text of the messages, etc.,
instead of just saying that messages were produced.
By the way, I think your test test should write to a file in [a
subdirectory of]] tempdir(), not to a file in the current directory.
comes from
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones <davidhughjones at gmail.com>
wrote:
Hi all, My package has errors on CRAN's Linux and Solaris: https://cran.r-project.org/web/checks/check_results_huxtable.html which I can't reproduce on my local OSX Machine, nor on Linux on Travis. Does anyone have any general hints on how to reproduce and/or debug such errors? Specifically the error relates to a call to openxlsx::saveWorkbook producing a message. openxlsx hasn't changed recently, though. Cheers, David [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Sent from Gmail Mobile [[alternative HTML version deleted]]
On Wed, Mar 13, 2019, 1:13 PM David Hugh-Jones <davidhughjones at gmail.com> wrote:
Hi Bill, I take your point. Meanwhile, though, is there any way to debug the problem? I?ll assume that making repeated uploads to CRAN is not a viable approach.... it would be great if there were a Docker image of their setup available, for example.
Have you tested your package on https://builder.r-hub.io/ or https://win-builder.r-project.org/ ?
On Wed, 13 Mar 2019 at 17:00, William Dunlap <wdunlap at tibco.com> wrote:
The complaint
test_check("huxtable")
-- 1. Failure: Data written in appropriate format
(@test-openxlsx.R#101) ------
`openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx", overwrite =
TRUE)` produced messages.
comes from your call to testthat::expect_silent()
test_that("Data written in appropriate format", {
hx <- huxtable(a = 1:2 + 0.5, b = -1:-2 + 0.5, d = letters[1:2],
add_colnames = TRUE)
wb <- as_Workbook(hx)
expect_silent(openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx",
overwrite = TRUE))
Perhaps you should suggest to the authors of testthat that it would be
nice if expect_silent() showed some of the text of the messages, etc.,
instead of just saying that messages were produced.
By the way, I think your test test should write to a file in [a
subdirectory of]] tempdir(), not to a file in the current directory.
comes from
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones <
davidhughjones at gmail.com>
wrote:
Hi all, My package has errors on CRAN's Linux and Solaris: https://cran.r-project.org/web/checks/check_results_huxtable.html which I can't reproduce on my local OSX Machine, nor on Linux on
Travis.
Does anyone have any general hints on how to reproduce and/or debug
such
errors?
Specifically the error relates to a call to openxlsx::saveWorkbook
producing a message. openxlsx hasn't changed recently, though.
Cheers,
David
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
--
Sent from Gmail Mobile
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
You can stick your own version of expect_silent into the test file. Have it print the messages, output, and warnings that it finds. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Mar 13, 2019 at 10:13 AM David Hugh-Jones <davidhughjones at gmail.com> wrote:
Hi Bill, I take your point. Meanwhile, though, is there any way to debug the problem? I?ll assume that making repeated uploads to CRAN is not a viable approach.... it would be great if there were a Docker image of their setup available, for example. On Wed, 13 Mar 2019 at 17:00, William Dunlap <wdunlap at tibco.com> wrote:
The complaint
test_check("huxtable")
-- 1. Failure: Data written in appropriate format
(@test-openxlsx.R#101) ------
`openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx", overwrite =
TRUE)` produced messages.
comes from your call to testthat::expect_silent()
test_that("Data written in appropriate format", {
hx <- huxtable(a = 1:2 + 0.5, b = -1:-2 + 0.5, d = letters[1:2],
add_colnames = TRUE)
wb <- as_Workbook(hx)
expect_silent(openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx",
overwrite = TRUE))
Perhaps you should suggest to the authors of testthat that it would be
nice if expect_silent() showed some of the text of the messages, etc.,
instead of just saying that messages were produced.
By the way, I think your test test should write to a file in [a
subdirectory of]] tempdir(), not to a file in the current directory.
comes from
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones <
davidhughjones at gmail.com> wrote:
Hi all, My package has errors on CRAN's Linux and Solaris: https://cran.r-project.org/web/checks/check_results_huxtable.html which I can't reproduce on my local OSX Machine, nor on Linux on Travis. Does anyone have any general hints on how to reproduce and/or debug such errors? Specifically the error relates to a call to openxlsx::saveWorkbook producing a message. openxlsx hasn't changed recently, though. Cheers, David [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
-- Sent from Gmail Mobile
On 13/03/2019 12:59 p.m., William Dunlap wrote:
The complaint
test_check("huxtable")
-- 1. Failure: Data written in appropriate format
(@test-openxlsx.R#101) ------
`openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx", overwrite =
TRUE)` produced messages.
comes from your call to testthat::expect_silent()
test_that("Data written in appropriate format", {
hx <- huxtable(a = 1:2 + 0.5, b = -1:-2 + 0.5, d = letters[1:2],
add_colnames = TRUE)
wb <- as_Workbook(hx)
expect_silent(openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx",
overwrite = TRUE))
Perhaps you should suggest to the authors of testthat that it would be nice
if expect_silent() showed some of the text of the messages, etc., instead
of just saying that messages were produced.
Yes.
By the way, I think your test test should write to a file in [a subdirectory of]] tempdir(), not to a file in the current directory.
That could be the source of the error: it's a violation of CRAN policy to write to the current directory. An obvious way to test this would be to make it unwriteable. Duncan Murdoch
comes from Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones <davidhughjones at gmail.com> wrote:
Hi all, My package has errors on CRAN's Linux and Solaris: https://cran.r-project.org/web/checks/check_results_huxtable.html which I can't reproduce on my local OSX Machine, nor on Linux on Travis. Does anyone have any general hints on how to reproduce and/or debug such errors? Specifically the error relates to a call to openxlsx::saveWorkbook producing a message. openxlsx hasn't changed recently, though. Cheers, David [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Hi guys That might be it. But there was no error until the latest release - whereas that test has been there for 9 months. The file is written within testthat... is there a new check for this in CRAN? Meanwhile, I am still figuring out how to debug this problem. I uploaded to r-hub... does anyone know how I can access the artifacts created after the build? The URL build was https://builder.r-hub.io/status/huxtable_4.4.0.tar.gz-b91485ad24b7a2f9c73bad2d51ebdb9d David
By the way, I think your test test should write to a file in [a subdirectory of]] tempdir(), not to a file in the current directory.
That could be the source of the error: it's a violation of CRAN policy to write to the current directory. An obvious way to test this would be to make it unwriteable. Duncan Murdoch
comes from Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones <
davidhughjones at gmail.com>
wrote:
Hi all, My package has errors on CRAN's Linux and Solaris: https://cran.r-project.org/web/checks/check_results_huxtable.html which I can't reproduce on my local OSX Machine, nor on Linux on Travis. Does anyone have any general hints on how to reproduce and/or debug such errors? Specifically the error relates to a call to openxlsx::saveWorkbook producing a message. openxlsx hasn't changed recently, though. Cheers, David [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
On 13/03/2019 8:34 p.m., David Hugh-Jones wrote:
Hi guys That might be it. But there was no error until the latest release - whereas that test has been there for 9 months. The file is written within testthat... is there a new check for this in CRAN? Meanwhile, I am still figuring out how to debug this problem. I uploaded to r-hub... does anyone know how I can access the artifacts created after the build? The URL build was https://builder.r-hub.io/status/huxtable_4.4.0.tar.gz-b91485ad24b7a2f9c73bad2d51ebdb9d
You should have got an email giving the link. In the ones I've seen, you replace the prefix https://builder.r-hub.io/status/ with https://artifacts.r-hub.io/ and you'll see them. It works for yours. Duncan Murdoch
David
> By the way, I think your test test should write to a file in [a
> subdirectory of]] tempdir(), not to a file in the current directory.
That could be the source of the error:? it's a violation of CRAN policy
to write to the current directory.? An obvious way to test this
would be
to make it unwriteable.
Duncan Murdoch
>
> comes from
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com <http://tibco.com>
>
>
> On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones
<davidhughjones at gmail.com <mailto:davidhughjones at gmail.com>>
> wrote:
>>
>> Hi all,
>>
>> My package has errors on CRAN's Linux and Solaris:
>>
>> https://cran.r-project.org/web/checks/check_results_huxtable.html
>>
>> which I can't reproduce on my local OSX Machine, nor on Linux on
Travis.
>>
>> Does anyone have any general hints on how to reproduce and/or
debug such
>> errors?
>>
>> Specifically the error relates to a call to openxlsx::saveWorkbook
>> producing a message. openxlsx hasn't changed recently, though.
>>
>> Cheers,
>> David
>>
>>? ? ? ? ? [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-package-devel at r-project.org
<mailto:R-package-devel at r-project.org> mailing list
>
>? ? ? ?[[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel at r-project.org
<mailto:R-package-devel at r-project.org> mailing list
Thank you! Got it. This should be close enough to CRAN, and there?s a Docker image available too. On Thu, 14 Mar 2019 at 00:40, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
On 13/03/2019 8:34 p.m., David Hugh-Jones wrote:
Hi guys That might be it. But there was no error until the latest release - whereas that test has been there for 9 months. The file is written within testthat... is there a new check for this in CRAN? Meanwhile, I am still figuring out how to debug this problem. I uploaded to r-hub... does anyone know how I can access the artifacts created after the build? The URL build was
https://builder.r-hub.io/status/huxtable_4.4.0.tar.gz-b91485ad24b7a2f9c73bad2d51ebdb9d You should have got an email giving the link. In the ones I've seen, you replace the prefix https://builder.r-hub.io/status/ with https://artifacts.r-hub.io/ and you'll see them. It works for yours. Duncan Murdoch
David
> By the way, I think your test test should write to a file in [a
> subdirectory of]] tempdir(), not to a file in the current
directory.
That could be the source of the error: it's a violation of CRAN
policy
to write to the current directory. An obvious way to test this
would be
to make it unwriteable.
Duncan Murdoch
>
> comes from
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com <http://tibco.com>
>
>
> On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones
<davidhughjones at gmail.com <mailto:davidhughjones at gmail.com>>
> wrote:
>>
>> Hi all,
>>
>> My package has errors on CRAN's Linux and Solaris:
>>
>>
>>
>> which I can't reproduce on my local OSX Machine, nor on Linux on
Travis.
>>
>> Does anyone have any general hints on how to reproduce and/or
debug such
>> errors?
>>
>> Specifically the error relates to a call to
openxlsx::saveWorkbook
>> producing a message. openxlsx hasn't changed recently, though.
>>
>> Cheers,
>> David
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-package-devel at r-project.org
<mailto:R-package-devel at r-project.org> mailing list
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel at r-project.org
<mailto:R-package-devel at r-project.org> mailing list
--
Sent from Gmail Mobile
To follow up on the great answers regarding R-hub,- to use R-hub Linux Docker images you can use this brand-new rhub function?https://r-hub.github.io/rhub/reference/local_check_linux.html (untested on Windows)- here's WIP R-hub docs entry about choosing a platform to reproduce an error?https://docs.r-hub.io/#rhub-cran-platforms Ma?lle. Den torsdag 14 mars 2019 08:48:34 CET, David Hugh-Jones <davidhughjones at gmail.com> skrev: Thank you! Got it. This should be close enough to CRAN, and there?s a Docker image available too. On Thu, 14 Mar 2019 at 00:40, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
On 13/03/2019 8:34 p.m., David Hugh-Jones wrote:
Hi guys That might be it. But there was no error until the latest release - whereas that test has been there for 9 months. The file is written within testthat... is there a new check for this in CRAN? Meanwhile, I am still figuring out how to debug this problem. I uploaded to r-hub... does anyone know how I can access the artifacts created after the build? The URL build was
https://builder.r-hub.io/status/huxtable_4.4.0.tar.gz-b91485ad24b7a2f9c73bad2d51ebdb9d You should have got an email giving the link.? In the ones I've seen, you replace the prefix https://builder.r-hub.io/status/ with https://artifacts.r-hub.io/ and you'll see them.? It works for yours. Duncan Murdoch
David ? ? ? > By the way, I think your test test should write to a file in [a ? ? ? > subdirectory of]] tempdir(), not to a file in the current
directory.
? ? That could be the source of the error:? it's a violation of CRAN
policy
? ? to write to the current directory.? An obvious way to test this ? ? would be ? ? to make it unwriteable. ? ? Duncan Murdoch ? ? ? > ? ? ? > comes from ? ? ? > Bill Dunlap ? ? ? > TIBCO Software ? ? ? > wdunlap tibco.com <http://tibco.com> ? ? ? > ? ? ? > ? ? ? > On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones ? ? <davidhughjones at gmail.com <mailto:davidhughjones at gmail.com>> ? ? ? > wrote: ? ? ? >> ? ? ? >> Hi all, ? ? ? >> ? ? ? >> My package has errors on CRAN's Linux and Solaris: ? ? ? >> ? ? ? >>
? ? ? >> ? ? ? >> which I can't reproduce on my local OSX Machine, nor on Linux on ? ? Travis. ? ? ? >> ? ? ? >> Does anyone have any general hints on how to reproduce and/or ? ? debug such ? ? ? >> errors? ? ? ? >> ? ? ? >> Specifically the error relates to a call to
openxlsx::saveWorkbook
? ? ? >> producing a message. openxlsx hasn't changed recently, though. ? ? ? >> ? ? ? >> Cheers, ? ? ? >> David ? ? ? >> ? ? ? >>? ? ? ? ? [[alternative HTML version deleted]] ? ? ? >> ? ? ? >> ______________________________________________ ? ? ? >> R-package-devel at r-project.org ? ? <mailto:R-package-devel at r-project.org> mailing list ? ? ? >> https://stat.ethz.ch/mailman/listinfo/r-package-devel ? ? ? > ? ? ? >? ? ? [[alternative HTML version deleted]] ? ? ? > ? ? ? > ______________________________________________ ? ? ? > R-package-devel at r-project.org ? ? <mailto:R-package-devel at r-project.org> mailing list ? ? ? > https://stat.ethz.ch/mailman/listinfo/r-package-devel ? ? ? >
--
Sent from Gmail Mobile ??? [[alternative HTML version deleted]] ______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
1 day later
Thanks to Ma?lle for getting me fixed up with r-hub, which is looking quite slick. I debugged the problem and it comes down to the R tinytex package not playing nicely with Debian?s texlive installation. I think the answer is just to turn off all relevant tests on CRAN. It?s reasonable for them to use texlive, and reasonable for Yihui to not want to support it; meanwhile Travis etc still run the tests. Thanks for your help, everyone! David
On Thu, 14 Mar 2019 at 12:50, Ma?lle SALMON <maelle.salmon at yahoo.se> wrote:
To follow up on the great answers regarding R-hub, - to use R-hub Linux Docker images you can use this brand-new rhub function https://r-hub.github.io/rhub/reference/local_check_linux.html (untested on Windows) - here's WIP R-hub docs entry about choosing a platform to reproduce an error https://docs.r-hub.io/#rhub-cran-platforms Ma?lle. Den torsdag 14 mars 2019 08:48:34 CET, David Hugh-Jones < davidhughjones at gmail.com> skrev: Thank you! Got it. This should be close enough to CRAN, and there?s a Docker image available too. On Thu, 14 Mar 2019 at 00:40, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
On 13/03/2019 8:34 p.m., David Hugh-Jones wrote:
Hi guys That might be it. But there was no error until the latest release - whereas that test has been there for 9 months. The file is written within testthat... is there a new check for this in CRAN? Meanwhile, I am still figuring out how to debug this problem. I
uploaded
to r-hub... does anyone know how I can access the artifacts created after the build? The URL build was
You should have got an email giving the link. In the ones I've seen, you replace the prefix https://builder.r-hub.io/status/ with https://artifacts.r-hub.io/ and you'll see them. It works for yours. Duncan Murdoch
David
> By the way, I think your test test should write to a file in [a
> subdirectory of]] tempdir(), not to a file in the current
directory.
That could be the source of the error: it's a violation of CRAN
policy
to write to the current directory. An obvious way to test this would be to make it unwriteable. Duncan Murdoch
>
> comes from
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com <http://tibco.com>
>
>
> On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones
<davidhughjones at gmail.com <mailto:davidhughjones at gmail.com>>
> wrote:
>>
>> Hi all,
>>
>> My package has errors on CRAN's Linux and Solaris:
>>
>>
>>
>> which I can't reproduce on my local OSX Machine, nor on Linux
on
Travis.
>>
>> Does anyone have any general hints on how to reproduce and/or
debug such
>> errors?
>>
>> Specifically the error relates to a call to
openxlsx::saveWorkbook
>> producing a message. openxlsx hasn't changed recently, though.
>>
>> Cheers,
>> David
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-package-devel at r-project.org
<mailto:R-package-devel at r-project.org> mailing list
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel at r-project.org
<mailto:R-package-devel at r-project.org> mailing list
--
Sent from Gmail Mobile
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Sent from Gmail Mobile [[alternative HTML version deleted]]