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, "rb") : cannot open the connection" get_map filename download issue? #347

Open
SimonDedman opened this issue Mar 8, 2023 · 1 comment

Comments

@SimonDedman
Copy link

For get_map / get_googlemap my (Mac) friend gets this error:

Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "rb") :
  cannot open compressed file '/var/folders/dl/4l7n6kz96_1c18vhwrgx90740000gn/T//RtmpZyYp5f/ggmap/index.rds', probable reason 'No such file or directory'

The/ggmap folder has been created (suggesting R/Rstudio/ggmap has permission to write there).

Someone having a similar issue said it might be due to filename length (maybe adding the tile files and the index.rds would have exceeded a limit) but there's no way to verify this because it's not possible to change the download location of tile files and the index (see issue).

When I run the same code:

myMap <- ggmap::get_map(
location = c(-64.726720, 32.348871),
zoom = 16,
source = "google",
maptype = "satellite",
crop = TRUE,
filename = "/home/simon/Desktop/MAP")

on my linux system it works fine. AND it worked fine for her before. Her API key seems to work.
Any ideas welcome. Thanks.

@JeremyLGauthier
Copy link

I had the same problem at one point and a restart of Rstudio solved it.
Hope this helps...

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