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 gzfile(file, mode) : cannot open the connection #181

Closed
GuodongZhu opened this issue Nov 12, 2016 · 10 comments
Closed

Error in gzfile(file, mode) : cannot open the connection #181

GuodongZhu opened this issue Nov 12, 2016 · 10 comments
Milestone

Comments

@GuodongZhu
Copy link

Hi Sckott,

when I use isd_stations() or isd_stations_search( ), I got the following error

Error in gzfile(file, mode) : cannot open the connection
In addition: Warning message:
In gzfile(file, mode) :
  cannot open compressed file 'C:\Users\Admin\AppData\Local\rnoaa\rnoaa\Cache/isd_stations.rds', probable reason 'No such file or directory'

And I have checked that the directory indeed doesn't exists. Does isd_station() store the temporary result in that directory? Why it can't find it? And I have tried to run R as administrator.

Thanks!

sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
[1] datamart_0.5.2 rnoaa_0.6.5   

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.7      xml2_1.0.0       magrittr_1.5     rappdirs_0.3.1   munsell_0.4.3    colorspace_1.3-0
 [7] R6_2.2.0         stringr_1.1.0    httr_1.2.1       plyr_1.8.4       dplyr_0.5.0      tools_3.2.2     
[13] grid_3.2.2       gtable_0.2.0     DBI_0.5-1        lazyeval_0.2.0   assertthat_0.1   tibble_1.2      
[19] gridExtra_2.2.1  ggplot2_2.2.0    tidyr_0.6.0      curl_2.2         mime_0.5         stringi_1.1.2   
[25] scales_0.4.1     XML_3.98-1.5     jsonlite_1.1     lubridate_1.6.0 
@sckott
Copy link
Contributor

sckott commented Nov 12, 2016

Looks like we may be doing paths incorrectly on windows. i'll look into it

@GuodongZhu
Copy link
Author

Hi Sckott,

Looks like it is a small bug in version 0.6.5. I just installed 0.6.4 and there is no error.

-Guodong

@sckott
Copy link
Contributor

sckott commented Nov 13, 2016

thanks for the update.

@sckott
Copy link
Contributor

sckott commented Nov 13, 2016

@GuodongZhu Okay, try again your example after reinstalling from here: devtools::install_github("ropensci/rnoaa")

it should work now

@GuodongZhu
Copy link
Author

It works now, thanks!

@sckott sckott added this to the v0.6.6 milestone Nov 13, 2016
@sckott sckott closed this as completed Nov 16, 2016
@xmagicanderson
Copy link

This happened to me too. What worked for me was deleting the ".rds" file in my working directory/my documents.

@sckott
Copy link
Contributor

sckott commented Dec 19, 2017

thanks @xmagicanderson for your comment on this - good to know

@pickardpredictives
Copy link

This is a little old, I know; but I get the same error. I'm creating a learnr tutorial. I don't see an .rds file in the location specified in the warning message, or in the working directory.

Listening on http://127.0.0.1:6017
Warning in gzfile(file, mode) :
  cannot open compressed file 'C:\Users\A1849763\AppData\Local/R/learnr/tutorial/storage/A1849763/C%3A%2FUsers%2FA1849763%2FNextcloud%2FNIU%2FClasses%2F2019%2FSpring%2FACCY%20415%2FMaterials%2F2_3%20-%20Regression%2FRegression%20Tutorial/1.0/tutorial-client-state-825E9CBB-FF7A-4C2C-A201-A075AB758F34.rds', probable reason 'No such file or directory'
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] rprojroot_1.3-2 corrplot_0.84   imager_0.41.2   magrittr_1.5    readxl_1.2.0    forcats_0.3.0  
 [7] dplyr_0.7.8     purrr_0.3.0     readr_1.3.1     tidyr_0.8.2     tibble_2.0.1    ggplot2_3.1.0  
[13] tidyverse_1.2.1 stringr_1.4.0   learnr_0.9.2.1 

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0       lubridate_1.7.4  lattice_0.20-38  png_0.1-7        utf8_1.1.4       assertthat_0.2.0
 [7] digest_0.6.18    mime_0.6         tiff_0.1-5       R6_2.4.0         cellranger_1.1.0 plyr_1.8.4      
[13] backports_1.1.3  evaluate_0.13    httr_1.4.0       pillar_1.3.1     rlang_0.3.1      lazyeval_0.2.1  
[19] rstudioapi_0.9.0 bmp_0.3          rmarkdown_1.11.9 htmlwidgets_1.3  igraph_1.2.3     munsell_0.5.0   
[25] shiny_1.2.0      broom_0.5.1      compiler_3.5.2   httpuv_1.4.5.1   modelr_0.1.3     xfun_0.5        
[31] askpass_1.1      pkgconfig_2.0.2  htmltools_0.3.6  openssl_1.2.1    readbitmap_0.1.5 tidyselect_0.2.5
[37] fansi_0.4.0      crayon_1.3.4     withr_2.1.2      later_0.8.0      grid_3.5.2       nlme_3.1-137    
[43] jsonlite_1.6     xtable_1.8-3     gtable_0.2.0     scales_1.0.0     cli_1.0.1        stringi_1.3.1   
[49] promises_1.0.1   bindrcpp_0.2.2   xml2_1.2.0       generics_0.0.2   tools_3.5.2      glue_1.3.0      
[55] markdown_0.9     hms_0.4.2        jpeg_0.1-8       rsconnect_0.8.13 yaml_2.2.0       colorspace_1.4-0
[61] rvest_0.3.2      knitr_1.21.13    bindr_0.1.1      haven_2.0.0   

@sckott
Copy link
Contributor

sckott commented Mar 20, 2019

@pickardpredictives thanks for the session info, but i don't see the rnoaa version in there

@pickardpredictives
Copy link

Sorry, wrong place, huh? Similar error. I'll post it to learnr.

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

4 participants