bcgov / bcdata

An R package for searching & retrieving data from the B.C. Data Catalogue
https://bcgov.github.io/bcdata
Apache License 2.0
81 stars 12 forks source link

Error in `path_to_connection()`: ! does not exist in current working directory #339

Closed CameronCosgrove closed 1 week ago

CameronCosgrove commented 2 weeks ago

My bcdata code has unexpectedly stopped working and no longer can download data from the BC data catalogue.

Running the example code provided in the package documentation throws an error in the path_to_connection() function.

Do you have any idea what is causing this behaviour? All my R and Rstudio options are default, and this code worked perfectly a few weeks ago.

Thanks for this package!


library(tidyverse)
library(bcdata)
library(terra)

bc_regional_districts_metadata <- bcdc_get_record("d1aff64e-dbfe-45a6-af97-582b7f6418b9")

my_regional_district <- bcdc_query_geodata(bc_regional_districts_metadata) %>%
  filter(ADMIN_AREA_NAME == "Capital Regional District") %>%
  collect()

Error in path_to_connection(): ! does not exist in current working directory ('\SFP.IDIR.BCGOV/U109/CCOSGROV$').

ateucher commented 2 weeks ago

Thanks for reporting this! This was also reported in another issue (https://github.com/bcgov/bcdata/issues/335#issuecomment-2209427823), but will track it here since that was a separate problem.

I'll investigate, it may be a leftover hiccup from the outage that happened earlier.

ateucher commented 2 weeks ago

The issue is that the GetCapabilities request is returning a completely empty response: https://openmaps.gov.bc.ca/geo/pub/wfs?request=GetCapabilities&version=2.0.0. We use this to determine the maximum number of records. We've had issues with this request endpoint before so I will add a workaround for when it fails, but will also open a ticket with the Mapping Services team.

ateucher commented 2 weeks ago

@CameronCosgrove would you like to try again with the development version? Install with:

remotes::install_github("bcgov/bcdata@dbplyr-2.5-fixes")
CameronCosgrove commented 1 week ago

@ateucher Yes this works! Bcdata is a core package for lots of my processing so I am very appreciative of your rapid fix :)

The only change with this dev version is that I get a new message when I run bcdc_query_geodata() Unable to access wfs record listing, using default download limit of 10000

But the data outputs look the same. Many thanks!

ateucher commented 1 week ago

Excellent, thanks for confirming! Yes that's the message indicating that it couldn't get information about the download limit size. I'll make the message a bit clearer...

smnorris commented 1 week ago

but will also open a ticket with the Mapping Services team.

Is there any way I can subscribe to this ticket? I'd prefer not to implement a similar workaround for python bcdata if this is going to be resolved short term.

ateucher commented 1 week ago

I can see if I can add you - but I just got a response saying it is now back up (as you noted). I also suggested they add it to uptime as per #340

smnorris commented 1 week ago

Don't worry about it, I created my own.