Skip to content

'Values are either not list nor dict' error from var2value function in model.py #114

@stevemussmann

Description

@stevemussmann

Good afternoon,

I have been trying to run the gadma-run_ls_on_boot_data script and keep receiving the following error:

Traceback (most recent call last):
  File "/home/mussmann/miniconda3/envs/gadma/bin/gadma-run_ls_on_boot_data", line 10, in <module>
    sys.exit(main())
  File "/home/mussmann/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/run_ls_on_boot_data.py", line 247, in main
    res = run_job((fs_filename, fs, p0, settings))
  File "/home/mussmann/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/run_ls_on_boot_data.py", line 50, in run_job
    theta = engine.get_theta(popt, *grid_size)
  File "/home/mussmann/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/engines/dadi_engine.py", line 170, in get_theta
    return super(DadiEngine, self).get_theta(values, pts)
  File "/home/mussmann/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/engines/dadi_moments_common.py", line 136, in get_theta
    key = self._get_key(values, grid_sizes)
  File "/home/mussmann/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/engines/dadi_moments_common.py", line 71, in _get_key
    var2value = self.model.var2value(x)
  File "/home/mussmann/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/models/model.py", line 127, in var2value
    raise TypeError(f"Values are either not list nor dict: {values}")
TypeError: Values are either not list nor dict: None

The command I have been using is gadma-run_ls_on_boot_data -b sfs/ -d "gadma/3pop/efh_slow/models/m1/best_logLL_model_dadi_code.py" -o step1/ --opt log

When trying to troubleshoot the issue I noticed that I was running gadma v2.0.0, so I tried updating to v2.0.3 and still received the same error. I also get basically the same error in v2.0.0 if I try running the best_logLL_model_moments_code.py file.

Do you have any ideas of what may be causing the issue, or any recommendations for troubleshooting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions