CDK-R / cdkr

Integrating R and the CDK
https://cdk-r.github.io/cdkr/
42 stars 27 forks source link

get.mol2formula: Error in .jcall(), invalid object parameter #79

Closed sneumann closed 5 years ago

sneumann commented 5 years ago

Hi, Both my local R CMD check as well as Travis report an issue: https://travis-ci.org/sneumann/cdkr/builds/447702470#L3022

Error: processing vignette 'molform.Rmd' failed with diagnostics:
RcallMethod: invalid object parameter

This comes from

> library(rcdk)
Loading required package: rcdklibs
Loading required package: rJava
> sp <- get.smiles.parser()
> molecule <- parse.smiles('N')[[1]]
> convert.implicit.to.explicit(molecule)
> formula <- get.mol2formula(molecule,charge=0)
Error in .jcall(ch, "D", "doubleValue") : 
  RcallMethod: invalid object parameter

in

> traceback()
3: .jcall(ch, "D", "doubleValue")
2: .cdkFormula.createObject(.jcast(moleculaJT, .IMolecularFormula))
1: get.mol2formula(molecule, charge = 0)

Can someone confirm ? Ideas ? Yours, Steffen

> sessionInfo()
R Under development (unstable) (2018-10-17 r75450)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS

Matrix products: default
BLAS: /vol/R/R-devel/lib/R/lib/libRblas.so
LAPACK: /vol/R/R-devel/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=en_US.UTF-8           LC_COLLATE=en_US.UTF-8       
 [5] LC_MONETARY=en_US.UTF-8       LC_MESSAGES=en_US.UTF-8      
 [7] LC_PAPER=en_US.UTF-8          LC_NAME=en_US.UTF-8          
 [9] LC_ADDRESS=en_US.UTF-8        LC_TELEPHONE=en_US.UTF-8     
[11] LC_MEASUREMENT=en_US.UTF-8    LC_IDENTIFICATION=en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rcdk_3.4.9     rcdklibs_2.2.1 rJava_0.9-10  

loaded via a namespace (and not attached):
[1] compiler_3.6.0    tools_3.6.0       parallel_3.6.0    fingerprint_3.5.7
[5] iterators_1.0.10  itertools_0.1-3   png_0.1-7         tcltk_3.6.0      
sneumann commented 5 years ago

Ah, this is a duplicate of https://github.com/rajarshi/cdkr/issues/75#issuecomment-426271541

schymane commented 5 years ago

Should this be closed as Zach closed the related issue #75 ?

rajarshi commented 5 years ago

This is working in the massfuncs branch

rajarshi commented 5 years ago

And @zachcp closed #75 so I think this can be closed

zachcp commented 5 years ago

the error was due to calling a function on a NULL value that was due to isotope handling. If thats fixe din mass funcs then this is obsolete

rajarshi commented 5 years ago

Yes, it appears to be working fine in the massfuncs branch. @sneumann can you close this issue?

sneumann commented 5 years ago

Hi, I can confirm that build succeeds locally ‘molform.Rmd’ using UTF-8 ... OK on both master and massfuncs and since Rajarshi's recent merge also on Travis: https://travis-ci.org/CDK-R/cdkr Yours, Steffen