Skip to content

Ambiguous error when using fetch_tbl on a null response #17

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

Closed
dshemetov opened this issue Mar 21, 2022 · 0 comments · Fixed by #99
Closed

Ambiguous error when using fetch_tbl on a null response #17

dshemetov opened this issue Mar 21, 2022 · 0 comments · Fixed by #99
Assignees
Labels
bug Something isn't working good first issue Good for newcomers P0 Top priority

Comments

@dshemetov
Copy link
Contributor

A call that produces a null result, such as

y <- covidcast( 
      data_source = "bad-source", 
      signals = "bad-signal", 
      geo_type = "state",  
      time_type = "day", 
      time_value = epirange(20200601, 20221201),
      geo_values = "ca,fl")

produces a cryptic error when requesting fetch_tbl

r$> y %>% fetch_tbl
Error: '' does not exist in current working directory ('/home/dskel/Documents/Code/Delphi/epiprocess').

This is because fetch_tbl calls fetch_csv and attempts to readr::read_csv on the output without validation and, in this case, fetch_csv returns an empty string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers P0 Top priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants