sktime / sktime

A unified framework for machine learning with time series
https://www.sktime.net
BSD 3-Clause "New" or "Revised" License
7.75k stars 1.32k forks source link

[BUG] TypeError: unsupported operand type(s) for +: 'set' and 'str' #6257

Closed pranavvp16 closed 5 months ago

pranavvp16 commented 5 months ago

In file sktime/datasets/_single_problem_loaders.py the mentioned error is raised as it is trying to concatenate set to str

if name not in list(tsf_all_datasets):
            raise ValueError(
                {name}
                + " is not a valid dataset name. \
                    List of valid dataset names can be found at \
                    sktime.datasets.tsf_dataset_names.tsf_all_datasets"
            )

I'll make a PR fixing the issue by using f string

fkiraly commented 5 months ago

yes, there should be an f string.

We should also probably test that the message is raised with pytest.raises, to avoid this reoccurring later.

fkiraly commented 5 months ago

Fixed via #6258