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 loadNamespace(name) : there is no package called 'utf8' #374

Closed
rmsharp opened this issue May 10, 2020 · 6 comments
Closed

Error in loadNamespace(name) : there is no package called 'utf8' #374

rmsharp opened this issue May 10, 2020 · 6 comments

Comments

@rmsharp
Copy link

rmsharp commented May 10, 2020

using R Under development (unstable) (2020-04-22 r78281) (1.2s)
─ using platform: x86_64-w64-mingw32 (64-bit)

Different runs can produce different packages that are not available. I had 'pillar' not available twice in a row.

I preparation for a CRAN submission of github.com/rmsharp/nprcgenekeepr

checking examples with --run-donttest (26.8s)
Running examples in 'nprcgenekeepr-Ex.R' failed
The error most likely occurred in:

base::assign(".ptime", proc.time(), pos = "CheckExEnv")

Name: makeRelationClassesTable

Title: Make relation classes table from 'kin' dataframe.

Aliases: makeRelationClassesTable

** Examples

No test:

library(nprcgenekeepr)
suppressMessages(library(dplyr))

qcPed <- nprcgenekeepr::qcPed
bkmat <- kinship(qcPed$id, qcPed$sire, qcPed$dam, qcPed$gen,

  •              sparse = FALSE)
    

kin <- convertRelationships(bkmat, qcPed)
relClasses <- makeRelationClassesTable(kin)
relClasses$Relationship Class <- as.character(relClasses$Relationship Class)
relClassTbl <- kin[!kin$relation == "Self", ] %>%

  • summarise(count = n())

relClassTbl

  • group_by(relation) %>%
    Error in loadNamespace(name) : there is no package called 'utf8'
    Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
    Execution halted
@joelgombin
Copy link

I have a similar problem when preparing for a CRAN submission for joelgombin/banR.
When running rhub::check_for_cran(), I get:

checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
   Maintainer: 'Joel Gombin <joel.gombin@gmail.com>'
✓  checking package namespace information
E  checking package dependencies
   Package required but not available: 'utf8'

I actually tried to include utf8 because otherwise the vignette building would fail with: there is no package called 'utf8'.

@gaborcsardi
Copy link
Collaborator

This is probably the same as this issue: #367 (comment)

@tlorusso
Copy link

tlorusso commented May 11, 2020

I'm runing into the same problem:


* checking examples with --run-donttest ... ERROR
Running examples in 'swissdd-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: canton_json_to_dfr
> ### Title: Transform a opendata.swiss cantonal results json into a tibble
> ### Aliases: canton_json_to_dfr
> 
> ### ** Examples
> 
> 
> #most recent vote
> results <- canton_json_to_dfr()
> 
> # transform the json for a single votedate at counting district level
> canton_json_to_dfr(votedate="2020-02-09",geolevel = "zh_counting_districts")
Error in loadNamespace(name) : there is no package called 'utf8'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted

@gaborcsardi
Copy link
Collaborator

Did you try the workaround referred to in the previous comment?

@tlorusso
Copy link

Yes and it works fine.

Thanks :)

@magic-lantern
Copy link

Just to clarify things for others looking at this same issue: I used the below as recommended by @gaborcsardi - it fixed my utf8 build issue.

rhub::check(
  platform="windows-x86_64-devel",
  env_vars=c(R_COMPILE_AND_INSTALL_PACKAGES = "always")
)

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

5 participants