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

IOError when accessing the map #1

Open
belisards opened this issue Jan 9, 2025 · 3 comments
Open

IOError when accessing the map #1

belisards opened this issue Jan 9, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@belisards
Copy link

Hi, thank you for the package! I can't use the overture_sf function to access the Overture buildings datasets. Here is the error I get, even for the code example in the Readme page.


> library(overtureR)
> 
> duomo_coords <- c(11.2558, 43.7739)
> 
> buffer_distance <- 0.005
> 
> duomo_bbox <- st_bbox(c(
+   xmin = duomo_coords[1] - buffer_distance,
+   ymin = duomo_coords[2] - buffer_distance,
+   xmax = duomo_coords[1] + buffer_distance,
+   ymax = duomo_coords[2] + buffer_distance
+ ), crs = 4326)
> 
> data <- overture_sf("building", bbox = duomo_bbox)
Error: IOError: When getting information for key 'release/2024-12-18.0/theme=buildings/type=building' in bucket 'overturemaps-us-west-2': AWS Error UNKNOWN (HTTP status 301) during HeadObject operation: No response body. Looks like the configured region is '' while the bucket is located in 'us-west-2'.

Am I missing something?

@jfulponi jfulponi self-assigned this Jan 9, 2025
@jfulponi
Copy link
Owner

jfulponi commented Jan 9, 2025

Hi @belisards!
Thank you for using the package.
Yes, it seems I have to explicitly set the region of the s3-bucket. I fixed the problem in the last commit.
Please reinstall the package and let me know if it works :)

@belisards
Copy link
Author

Hi @jfulponi, thank you for the prompt response!

I've tried to re-install the package with the commands below, but the error persists.

remove.packages("overtureR")
devtools::install_github("jfulponi/overtureR", ref = "main", force = TRUE)

I double-checked if it matches the latest commit with:

> read.dcf(system.file("DESCRIPTION", package = "overtureR"))[,"RemoteSha"]
                                 RemoteSha 
"a44baaa2c3051c0aabc1402963d9f5b99b49f7f0" 

But when I check the record_batch_reader function it still doesn't have the location:

  dataset <- arrow::open_dataset(source = arrow::s3_bucket(path, 
    anonymous = TRUE), format = "parquet", filesystem = "s3")

I will try to manually clone the repository and install it again later.

@jfulponi jfulponi added the bug Something isn't working label Jan 9, 2025
@jfulponi
Copy link
Owner

Thank you for your help :)

I tried installing the package in Google Colab and I can't get the error. I can only receive the error if I manually change the 'region' to, for example, 'us-east-1'. I'll investigate more deeply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants