I can't use AnnotationHub()
1
0
Entering edit mode
755606975 • 0
@755606975-22698
Last seen 21 months ago
>library(AnnotationHub)
> ah<-AnnotationHub()
No internet connection using 'localHub=TRUE'
Error in .updateHubDB(hub_bfc, .class, url, proxy, localHub) : 
  Invalid Cache: sqlite file
  Hub has not been added to cache
  Run again with 'localHub=FALSE'


> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

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

other attached packages:
[1] AnnotationHub_2.18.0 BiocFileCache_1.10.2 dbplyr_1.4.2         BiocGenerics_0.32.0 

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3                    later_1.0.0                  
 [3] pillar_1.4.3                  compiler_3.6.2               
 [5] BiocManager_1.30.10           tools_3.6.2                  
 [7] zeallot_0.1.0                 digest_0.6.23                
 [9] bit_1.1-14                    RSQLite_2.2.0                
[11] memoise_1.1.0                 lifecycle_0.1.0              
[13] tibble_2.1.3                  gtable_0.3.0                 
[15] pkgconfig_2.0.3               rlang_0.4.2                  
[17] shiny_1.4.0                   DBI_1.1.0                    
[19] rstudioapi_0.10               yaml_2.2.0                   
[21] curl_4.3                      fastmap_1.0.1                
[23] dplyr_0.8.3                   httr_1.4.1                   
[25] IRanges_2.20.1                S4Vectors_0.24.1             
[27] vctrs_0.2.1                   rappdirs_0.3.1               
[29] stats4_3.6.2                  bit64_0.9-7                  
[31] grid_3.6.2                    tidyselect_0.2.5             
[33] Biobase_2.46.0                glue_1.3.1                   
[35] R6_2.4.1                      AnnotationDbi_1.48.0         
[37] ggplot2_3.2.1                 purrr_0.3.3                  
[39] blob_1.2.0                    magrittr_1.5                 
[41] promises_1.1.0                htmltools_0.4.0              
[43] scales_1.1.0                  backports_1.1.5              
[45] assertthat_0.2.1              xtable_1.8-4                 
[47] mime_0.8                      interactiveDisplayBase_1.24.0
[49] colorspace_1.4-1              httpuv_1.5.2                 
[51] lazyeval_0.2.2                munsell_0.5.0                
[53] BiocVersion_3.10.1            crayon_1.3.4 
AnnotationHub • 626 views
ADD COMMENT
0
Entering edit mode

So did you check if you have internet connection? or some of the proposed solutions of the error?

ADD REPLY
0
Entering edit mode

I have the internet connection.

ADD REPLY
0
Entering edit mode

Did you use localHub = FALSE ?

ADD REPLY
0
Entering edit mode
> ah<-AnnotationHub(localHub=F)
No internet connection using 'localHub=TRUE'
Error in .updateHubDB(hub_bfc, .class, url, proxy, localHub) : 
  Invalid Cache: sqlite file
  Hub has not been added to cache
  Run again with 'localHub=FALSE'

> ah<-AnnotationHub(localHub=T)
Error in .updateHubDB(hub_bfc, .class, url, proxy, localHub) : 
  Invalid Cache: sqlite file
  Hub has not been added to cache
  Run again with 'localHub=FALSE'

> refreshHub(hub,cache,proxy,hubClass=c("AnnotationHub","ExperimentHub"))
Error in refreshHub(hub, cache, proxy, hubClass = c("AnnotationHub", "ExperimentHub")) : 
  This function requires internet connection

ADD REPLY
0
Entering edit mode
shepherl 2.8k
@lshep
Last seen 4 hours ago
United States

The message does indicate it is not finding internet connection

Using localHub=FALSE would not work in this case if the hub had never been created and if there is no internet connection; it would need to work at least once to use the localHub option.

Are you behind a proxy that would prevent internet connection? If you are behind a proxy, please set the proxy by either using proxy= in the constructor or by setting globally with setAnnotationHubOption.

We check the internet connection by checking first if the proxy is set, and then by using curl::has_internet().

ADD COMMENT
0
Entering edit mode

Also in the future please tag the post with the package that is in question. I did not receive a notification because the tag did not include the package name annotationhub. Cheers.

ADD REPLY
0
Entering edit mode

I finally get it. I run this code, and all problems be solved. Thank you very much! Bless you. AnnotationHub(proxy='127.0.0.1:10801')

ADD REPLY
0
Entering edit mode

glad that was the issue. Cheers.

ADD REPLY

Login before adding your answer.

Traffic: 350 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6