ValueError when attempting to access Pod.subpods
Harmon758 opened this issue · comments
#25 is an issue with v4.1.0 rather than with the API.
77bac9a changed
wolframalpha/wolframalpha/__init__.py
Line 80 in 34f8954
more_itertools.always_iterable
rather than jaraco.itertools.always_iterable
.
By default, jaraco.itertools.always_iterable
treats a dictionary as a singleton, whereas more_itertools.always_iterable
iterates over the dictionary's keys. This causes accessing Pod.subpods
to error with ValueError: dictionary update sequence element #0 has length 1; 2 is required
now, as when a subpod dictionary is passed to more_itertools.always_iterable
, it will iterate over each of the keys, and when Subpod
is initialized, it will attempt to cast each of those keys, rather than the entire subpod dictionary, to a dict
.
It's so frustrating that although I contributed always_iterable
to more_itertools
, the implementation had to be tweaked to be less useful in situations like these.