Skip to content
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

Crash on robyn_refresh() using json_file: Can't combine ..1$ds <character> and ..2$ds <date> #480

Closed
laresbernardo opened this issue Aug 31, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@laresbernardo
Copy link
Collaborator

laresbernardo commented Aug 31, 2022

Describe issue

A user reported in our FB group that experimented the following issue when running robyn_refresh(). The full error is:

Error in `bind_rows()`:
! Can't combine `..1$ds` <character> and `..2$ds` <date>.
---
Backtrace:
     ▆
  1. ├─Robyn::robyn_refresh(...)
  2. │ └─listReportPrev$xDecompVecReport %>% ... at R/R/refresh.R:402:4
  3. └─dplyr::bind_rows(...)
  4.   ├─dplyr:::fix_call(vec_rbind(!!!dots, .names_to = .id))
  5.   │ └─base::withCallingHandlers(...)
  6.   └─vctrs::vec_rbind(!!!dots, .names_to = .id)
  7.     └─vctrs (local) `<fn>`()
  8.       └─vctrs::vec_default_ptype2(...)
  9.         └─vctrs::stop_incompatible_type(...)
 10.           └─vctrs:::stop_incompatible(...)
 11.             └─vctrs:::stop_vctrs(...)
 12.               └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))

Provide reproducible example

User shared his data and json files to reproduce the error.

modelrf.csv <- ".../data_for_refresh.csv"
modelrf.json <- ".../RobynModel-inputs.json"

modelrf.df <- read.csv(modelrf.csv, row.names = NULL)
RobynRefresh <- robyn_refresh(
  json_file = model1.json,
  dt_input = modelrf.df,
  dt_holidays = Robyn::dt_prophet_holidays,
  refresh_steps = 12,
  refresh_iters = 500,
  refresh_trials = 1
)

Environment & Robyn version

Make sure you're using the latest Robyn version before you post an issue.

  • Check and share Robyn version: 3.7.1
  • R version: R version 4.1.1 (2021-08-10)
@laresbernardo laresbernardo self-assigned this Aug 31, 2022
@laresbernardo laresbernardo added the bug Something isn't working label Aug 31, 2022
@NN-Marketing
Copy link

NN-Marketing commented Nov 14, 2022

Hi

Robyn Version 3.7.2
R version 4.2.2
Robyn Demo.R

Im' getting the same issue with different code..date and IDate..

>>> Running Pareto calculations for 10000 models on 3 fronts...
Error in `bind_rows()`:
! Can't combine `..1$ds` <date> and `..2$ds` <IDate>.
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/vctrs_error_ptype2>
Error in `bind_rows()`:
! Can't combine `..1$ds` <date> and `..2$ds` <IDate>.
Backtrace:
 1. Robyn::robyn_outputs(...)
 2. Robyn:::robyn_pareto(...)
 3. dplyr::bind_rows(...)
 6. vctrs::vec_rbind(!!!dots, .names_to = .id)
Run `rlang::last_trace()` to see the full context.
> rlang::last_trace()
<error/vctrs_error_ptype2>
Error in `bind_rows()`:
! Can't combine `..1$ds` <date> and `..2$ds` <IDate>.
Backtrace:
     ▆
  1. ├─Robyn::robyn_outputs(...)
  2. │ └─Robyn:::robyn_pareto(...)
  3. │   └─dplyr::bind_rows(...)
  4. │     ├─dplyr:::fix_call(vec_rbind(!!!dots, .names_to = .id))
  5. │     │ └─base::withCallingHandlers(...)
  6. │     └─vctrs::vec_rbind(!!!dots, .names_to = .id)
  7. └─vctrs (local) `<fn>`()
  8.   └─vctrs::vec_default_ptype2(...)
  9.     ├─base::withRestarts(...)
 10.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
 11.     │   └─base (local) doWithOneRestart(return(expr), restart)
 12.     └─vctrs::stop_incompatible_type(...)
 13.       └─vctrs:::stop_incompatible(...)
 14.         └─vctrs:::stop_vctrs(...)
 15.           └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))

@laresbernardo
Copy link
Collaborator Author

Hi @NN-Marketing this issue has already been fixed in the latest dev version. Can you please update to Robyn >=3.8.1 and try again in a fresh new session? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants