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

spell_check_package returns error in read_xml.raw #52

Closed
mps9506 opened this issue May 18, 2020 · 1 comment
Closed

spell_check_package returns error in read_xml.raw #52

mps9506 opened this issue May 18, 2020 · 1 comment

Comments

@mps9506
Copy link

mps9506 commented May 18, 2020

This might be related to #6, I've been unable to successfully troubleshoot the issue on my end. The following spelling.R file is setup to run spell check my package:

if(requireNamespace('spelling', quietly = TRUE))
  spelling::spell_check_test(error = FALSE,
                             skip_on_cran = TRUE)

When I run devtools::check(args = c('--as-cran')):

    Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html,  : 
       PCDATA invalid Char value 27 [9]
     Calls: <Anonymous> ... xml_find_all -> <Anonymous> -> read_xml.character -> read_xml.raw
     Execution halted

This isn't too informative. I don't know if spelling checks the html vignettes, but that was my initial thought. So I tried:

if(requireNamespace('spelling', quietly = TRUE))
  spelling::spell_check_test(vignettes = FALSE, error = FALSE,
                             skip_on_cran = TRUE)

And the check is successful.

My final check was to run spelling::spell_check_files() on the Rmd, html, and .r vignette files. These printed spelling errors but did not fail like above.

My big question is how do I troubleshoot this message? For reference the package is tbrf and the test failures are shown: https://github.com/mps9506/tbrf/runs/686572191?check_suite_focus=true#step:10:152

@jeroen
Copy link
Member

jeroen commented Oct 19, 2020

Thanks. This turns out to be a problem in commommark/xml conversion. Moving to -> r-lib/commonmark#14

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

2 participants