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

main branch does not load #156

Closed
philipdelff opened this issue Jul 6, 2023 · 6 comments
Closed

main branch does not load #156

philipdelff opened this issue Jul 6, 2023 · 6 comments

Comments

@philipdelff
Copy link

I get an error when trying to load nonmem2rx. The problem seems to be an assign function ‘model<-’ not correctly loaded from rxode2.

First I tried just instal.package("nonmem2rx")
It tried installing this:
https://cloud.r-project.org/src/contrib/nonmem2rx_0.1.2.tar.gz

This is the last part of the returned messages:

installing to x86_64-pc-linux-gnu-library/4.2/00LOCK-nonmem2rx/00new/nonmem2rx/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Error: object ‘model<-’ is not exported by 'namespace:rxode2'
Execution halted
ERROR: lazy loading failed for package ‘nonmem2rx’

Then I cloned the github main branch (revision 0b6da45 from July 3). The issue seems to persist:

   ** checking absolute paths in shared objects and dynamic libraries
─  DONE (nonmem2rx)
Error in `load_all()`:
! Failed to load R/reexport.R
Caused by error:
! 'model<-' is not an exported object from 'namespace:rxode2'
Run `rlang::last_trace()` to see where the error occurred.
Warning message:
object ‘model<-’ is not exported by 'namespace:rxode2' 
> rlang::last_trace()
<error/rlang_error>
Error in `load_all()`:
! Failed to load R/reexport.R
Caused by error:
! 'model<-' is not an exported object from 'namespace:rxode2'
---
Backtrace:
     ▆
  1. └─utils (local) .ess.ns_eval(...)
  2.   └─utils (local) .ess.ns_source(...)
  3.     └─utils (local) .ess.ns_evalSource(...)
  4.       └─utils (local) .ess.source(...)
  5.         └─base (local) ss(...)
  6.           ├─base::withVisible(eval(ei, envir))
  7.           └─base::eval(ei, envir)
  8.             └─base::eval(ei, envir)
  9.               └─devtools::load_all("~/wdirs/nonmem2rx") at /tmp/NMsim_VarCov.R!OjNnqe:1:0
 10.                 └─pkgload::load_all(...)
 11.                   └─pkgload::load_code(path, quiet = quiet)
 12.                     ├─withr (local) withr_with_dir(path, source_many(paths, encoding, env))
 13.                     │ └─base::force(code)
 14.                     └─pkgload:::source_many(paths, encoding, env)
 15.                       ├─rlang::try_fetch(...)
 16.                       │ ├─base::tryCatch(...)
 17.                       │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 18.                       │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 19.                       │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 20.                       │ └─base::withCallingHandlers(...)
 21.                       └─pkgload:::source_one(file, encoding, envir = envir)
 22.                         └─base::eval(exprs[i], envir)
 23.                           └─base::eval(exprs[i], envir)
Run rlang::last_trace(drop = FALSE) to see 5 hidden frames.
@billdenney
Copy link
Contributor

billdenney commented Jul 6, 2023

I think that you will need to install the current development version of rxode2 for the development version of nonmem2rx to work. Can you please try installing it using the instructions here: https://github.com/nlmixr2/rxode2#installation

And, you may want to go ahead and install the development version of the other nlmixr2 packages while you're at it: https://github.com/nlmixr2/nlmixr2#installation (These are not required for nonmem2rx, but they will bring additional functionality and bug fixes.)

@philipdelff
Copy link
Author

I see, thanks. But as described above, even the CRAN version of nonmem2rx does not install.

@billdenney
Copy link
Contributor

The CRAN versions should all be self-consistent. Can you confirm that you're running the current version of CRAN rxode2, version 2.0.13? We may need to set a minimum rxode2 version requirement for nonmem2rx.

@mattfidler
Copy link
Member

Hi @philipdelff

Thanks for your patience, for the model<- to work you need at least rxode2 2.0.12. I forgot to add that explicitly as a dependency .

Matt

@mattfidler
Copy link
Member

mattfidler commented Jul 6, 2023

I put the explicit requirements in the description file

@philipdelff
Copy link
Author

Thanks @mattfidler and @billdenney !

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

3 participants