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

projects() giving 502 error #33

Closed
vjcitn opened this issue Jul 3, 2022 · 4 comments
Closed

projects() giving 502 error #33

vjcitn opened this issue Jul 3, 2022 · 4 comments

Comments

@vjcitn
Copy link

vjcitn commented Jul 3, 2022

but when i use the swagger 'try it out' API seems to be alive, at least

> library(hca)
1/36 packages newly attached/loaded, see sessionInfo() for details.
> projects()
Error in .hca_GET(index_path) : Bad Gateway (HTTP 502).

Enter a frame number, or 0 to exit   

1: projects()
2: .index_GET(filters = filters, size = size, sort = sort, order = order, cata
3: .hca_GET(index_path)
4: stop_for_status(response)

Selection: 0
> sessionInfo()
R version 4.2.0 RC (2022-04-15 r82209)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS:   /home/stvjc/R-4-2-dist/lib/R/lib/libRblas.so
LAPACK: /home/stvjc/R-4-2-dist/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=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] hca_1.4.0      rmarkdown_2.14

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3         formatR_1.12         futile.logger_1.4.3 
 [4] compiler_4.2.0       pillar_1.7.0         dbplyr_2.1.1        
 [7] futile.options_1.0.1 tools_4.2.0          digest_0.6.29       
[10] bit_4.0.4            jsonlite_1.8.0       BiocFileCache_2.4.0 
[13] evaluate_0.15        RSQLite_2.2.14       memoise_2.0.1       
[16] lifecycle_1.0.1      tibble_3.1.7         pkgconfig_2.0.3     
[19] rlang_1.0.2          DBI_1.1.2            cli_3.3.0           
[22] filelock_1.0.2       curl_4.3.2           xfun_0.31           
[25] fastmap_1.1.0        dplyr_1.0.9          httr_1.4.3          
[28] knitr_1.39           hms_1.1.1            rappdirs_0.3.3      
[31] generics_0.1.2       vctrs_0.4.1          bit64_4.0.5         
[34] tidyselect_1.1.2     glue_1.6.2           R6_2.5.1            
[37] fansi_1.0.3          startup_0.18.0       lambda.r_1.2.4      
[40] tidyr_1.2.0          tzdb_0.3.0           readr_2.1.2         
[43] purrr_0.3.4          blob_1.2.3           magrittr_2.0.3      
[46] htmltools_0.5.2      ellipsis_0.3.2       assertthat_0.2.1    
[49] utf8_1.2.2           cachem_1.0.6         crayon_1.5.1        
> 
@vjcitn
Copy link
Author

vjcitn commented Jul 3, 2022

I am finding that index_path in .index_GET needs to be

"/index/projects?catalog=dcp17&filters=%7B%0A%20%20%22cellCount%22%3A%20%7B%0A%20%20%20%20%22within%22%3A%20%5B%0A%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%2010000%2C%0A%20%20%20%20%20%20%20%201000000000%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%5D%0A%20%20%7D%0A%7D&size=10&sort=projectTitle&order=asc"

for projects() to return a result

@vjcitn
Copy link
Author

vjcitn commented Jul 3, 2022

I changed the size element in the above to 1000 and now 81 records are returned

@mtmorgan
Copy link
Collaborator

mtmorgan commented Jul 3, 2022

Thanks; in the swagger setting filter to {} and size = 1000 seems to generate the error; I'll report up-stream (DataBiosphere/azul#4289). A work-around seems to require pagination

 p = projects(size = 200); dplyr::bind_rows(p, hca_next(p))

@mtmorgan
Copy link
Collaborator

closed by a796426

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