sol-eng/bike_predict

ETL Step 01 - Update the Database is failing

Closed this issue · 3 comments

For some reason the first ETL job is failing on Connect. It is working on Workbench. Here are the logs:

05/06 18:41:10.973 (GMT)
Data access failure: Error in loadNamespace(x): there is no package called 'httr'
05/06 18:41:10.973 (GMT)
Quitting from lines 28-53 (update_db.qmd)
05/06 18:41:10.974 (GMT)
Error in UseMethod("mutate") :
05/06 18:41:10.974 (GMT)
no applicable method for 'mutate' applied to an object of class "NULL"
05/06 18:41:10.974 (GMT)
Calls: local ... withVisible -> eval -> eval -> %>% -> <Anonymous> -> <Anonymous>
05/06 18:41:10.974 (GMT)
In addition: Warning message:
05/06 18:41:10.974 (GMT)
In system("whoami", intern = TRUE) : running command 'whoami' had status 1
05/06 18:41:10.977 (GMT)
Execution halted

The issue looks to be around here:

feeds_data <-
bikeHelpR::feeds_urls() %>%
filter(name == "station_status") %>%
pull(url) %>%
bikeHelpR::get_data()

For some reason this is returning NULL.

My guess is that there's a call to httr buried in there, but it's not getting into the manifest for some reason. My bet is putting a library(httr) and updating the manifest will fix.

Thank you Alex - just confirmed the issue was httr. For some reason Connect does not know that bikeHelpR depends on httr. As a work I have to import httr in my quarto document even though I never call it directly.

library(dplyr)
library(odbc)

# The following packages are not directly called, but are requirements. They
# need to be here so that `rsconnect::writeManifest` is able to capture them
# as a dependency.
library(dbplyr)
library(purrr)
library(magrittr)
library(httr)

Looks like someone (me) forgot to add httr to the bikeHelpR imports.