Skip to content

Summary stats prevents processing completion by default #1272

@TFirth2

Description

@TFirth2

By default:

summary_stats: run: true

which causes this error message in the terminal:

Traceback (most recent call last):
  File "/Users/t/miniconda3/envs/main_topostats/bin/topostats", line 8, in <module>
    sys.exit(entry_point())
  File "/Users/t/Documents/topostats/main_topostats/TopoStats/topostats/entry_point.py", line 1256, in entry_point
    args.func(args)
  File "/Users/t/Documents/topostats/main_topostats/TopoStats/topostats/run_modules.py", line 295, in process
    toposum(summary_config)
  File "/Users/t/Documents/topostats/main_topostats/TopoStats/topostats/plotting.py", line 395, in toposum
    result_option: tuple | None = topo_sum.sns_plot()
  File "/Users/t/Documents/topostats/main_topostats/TopoStats/topostats/plotting.py", line 231, in sns_plot
    sns.histplot(
  File "/Users/t/miniconda3/envs/main_topostats/lib/python3.10/site-packages/seaborn/distributions.py", line 1416, in histplot
    p.plot_univariate_histogram(
  File "/Users/t/miniconda3/envs/main_topostats/lib/python3.10/site-packages/seaborn/distributions.py", line 447, in plot_univariate_histogram
    densities = self._compute_univariate_density(
  File "/Users/t/miniconda3/envs/main_topostats/lib/python3.10/site-packages/seaborn/distributions.py", line 325, in _compute_univariate_density
    for sub_vars, sub_data in self.iter_data("hue", from_comp_data=True):
  File "/Users/t/miniconda3/envs/main_topostats/lib/python3.10/site-packages/seaborn/_base.py", line 948, in iter_data
    data_subset = grouped_data.get_group(pd_key)
  File "/Users/t/miniconda3/envs/main_topostats/lib/python3.10/site-packages/pandas/core/groupby/groupby.py", line 1103, in get_group
    warnings.warn(
FutureWarning: When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.

This prevent the final stats files from being produced. I think it would be easier if this was just set to false by default.

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