pacific-hake / pacifichakemse

A Management Strategy Evaluation for Pacific Hake
3 stars 2 forks source link

Seeking Advice on Debugging Error in MSE Code. #16

Open sacurin opened 6 months ago

sacurin commented 6 months ago

I'm currently facing a debugging challenge. Could some of you give me some advice on how to debugging into this error? I'm stuck.

  1. ├─pacifichakemse::run_mses(...)
    1. │ └─pacifichakemse::load_ss_model_data(...) at pacifichakemse/R/run_mses.R:114:3
    2. │ └─pacifichakemse::extract_age_comps(...) at pacifichakemse/R/ss_model_loading.R:579:3
    3. │ └─... %>% set_names(ages) at pacifichakemse/R/ss_model_loading.R:835:3

I think there is a problem with labels and dimensions in "age_comps" at ss_model_loading.R, but I can't resolve the issues yet. Line 114 at run_mses.R is crushing because age-comps. The rest works well. Thanks

cgrandin commented 6 months ago

Hi Sandra, did you put a browser() in just before that line and see why?

There were some issues with people having set_names() fail somewhere else (in the hake assessment code) and all we did to fix it was get rid of that line and set the names manually using

names(d) <- ages 

but of course making sure ages is the right length

sacurin commented 6 months ago

I'll try to do that, thanks Chris.