connectapi icon indicating copy to clipboard operation
connectapi copied to clipboard

Type conversion issues when retrieving job logs

Open mannau opened this issue 1 year ago • 2 comments

When retrieving job logs from rsconnect I encountered various errors when converting types - mainly:

  1. Converting to list() type which is actually a character (of length 1)
Error in `ensure_column()`:
! Can't convert `col` <character> to <list>.
  1. Converting a zero-length logical(0) to POSIXct
Error in `coerce_datetime()`:
! Can't convert `end_time` <logical> to match type of `to` <datetime<UTC>>.

I use the following code to retrieve logs:

item <- connectapi::content_item(client, guid[i])
jobs <- connectapi::get_jobs(item)

logs <- dplyr::bind_rows(lapply(jobs$key, function(k) {
      connectapi::get_job(item, k) # -> Throws Error
}))

The pull request #192 Fixes the mentioned issues.

mannau avatar Apr 26 '23 15:04 mannau

Any updates on this?

mannau avatar May 17 '23 08:05 mannau

Closing as this was fixed by #239 and released in 0.2.0.

toph-allen avatar Sep 06 '24 16:09 toph-allen