API downloading error 422

Hi! I am trying to download pattern data but run into an error. The following is my code without showing keys. The error is “Error during httr2::req_perform. HTTP 422 Unprocessable Entity.” I tried to install deweydatar again in case of an update (“install_github(“Dewey-Data/deweydatar”)”), but same error remains. Could you please help me out? Thanks.

{
library(deweydatar)
apikey_ = “”
pp_ = “”
files_df = get_file_list(apikey_, pp_, print_info = T)
files_df;
}

Hi @Guanting_Yi

Could you let me know the name of dataset you are trying to download and version of deweydatar you are using? sessionInfo() will show the version and must be v 0.1.5.

Thanks,

Hello,

My version is indeed v 0.1.5. The data that I want to download is Weekly Patterns - Foot Traffic.

Is it correct that I put the [key] in “https://app.deweydata.io/external-api/v3/products/[key]/files” as the pp_ input?

Thanks!

Somehow it seems like you are running on old version of the library. Copy & paste and run below entire source code and try again. Do not load library(deweydatar).

deweydatar/R/download.R at main · Dewey-Data/deweydatar (github.com)

Thanks,

Hi,
I am getting similar error even after using the updated github codes, kindly help

get_file_list(apikey_,MP_endpoints$home_panel_summary)
Error during httr2::req_perform.
HTTP 422 Unprocessable Entity.

I even tried the deweydatar package after getting previous error still the issue persist

deweydatar::download_files0(apikey_,
pp_advan_wp,
dest_folder,
filename_prefix = NULL,
skip_exists = TRUE)

Error during httr2::req_perform.
HTTP 422 Unprocessable Entity.

Could you please check this out Dewey-Data/deweydatar (github.com) and reinstall the library? The library has been updated with slightly different approach.

Thanks,