You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'Values are either not list nor dict' error from var2value function in model.py #114
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?
changed the title [-]'Values are either not list nor dict' error from var2val function in model.py[/-][+]'Values are either not list nor dict' error from var2value function in model.py[/+]on Apr 30, 2026
Thank you for your feedback, that is very interesting. I think the issue is in the first element of lower_bound and upper_bound. Can you remove 1.0 from lower_bound and 100000000.0 from upper_bound and check if that helps?
Is it true that you have not modified code files generated my GADMA and that these two values were originally there? If so, then this confirms that there is a bug in GADMA that I need to fix. Thank you.
I followed your suggestion and although gadma-run_ls_on_boot_data has not yet finished running, it has run far past the point where it crashed yesterday. It seems it will probably complete sometime after I go home for the day, but I will update again once it finishes.
Activity
[-]'Values are either not list nor dict' error from var2val function in model.py[/-][+]'Values are either not list nor dict' error from var2value function in model.py[/+]stevemussmann commentedon Apr 30, 2026
I have also attached my .sfs and .py files here (renamed to .txt since it won't let me upload .py or .sfs files)
CVWS-IND-EFH_2026.txt
best_logLL_model_dadi_code.txt
best_logLL_model_moments_code.txt
noscode commentedon May 1, 2026
Hi @stevemussmann ,
Thank you for your feedback, that is very interesting. I think the issue is in the first element of
lower_boundandupper_bound. Can you remove 1.0 fromlower_boundand 100000000.0 fromupper_boundand check if that helps?Is it true that you have not modified code files generated my GADMA and that these two values were originally there? If so, then this confirms that there is a bug in GADMA that I need to fix. Thank you.
Best,
Ekaterina
stevemussmann commentedon May 1, 2026
Hi Ekaterina,
Thank you for your quick response. I will remove those and report back what happens later today.
That is correct, I did not modify the code files in any way.
Thank you,
-Steve
stevemussmann commentedon May 1, 2026
Hi @noscode ,
I followed your suggestion and although
gadma-run_ls_on_boot_datahas not yet finished running, it has run far past the point where it crashed yesterday. It seems it will probably complete sometime after I go home for the day, but I will update again once it finishes.-Steve
stevemussmann commentedon May 4, 2026
Hi @noscode ,
This completed successfully over the weekend. If you need any information from me to help troubleshoot the bug that caused this, just let me know.
Thanks for your help,
-Steve
noscode commentedon May 6, 2026
Thank you very much for your feedback and help, I hope this bug can be easily resolved.