qiime2 / q2-metadata

BSD 3-Clause "New" or "Revised" License
3 stars 17 forks source link

view error in MetadataColumn #25

Closed antgonza closed 6 years ago

antgonza commented 6 years ago

[not sure if pertinent in this repo]

if you do list() on MetadataColumn[Categorical], MetadataColumn[Numeric], MetadataColumn[Categorical | Numeric]

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-55-dac0373818fc> in <module>()
      3         for iname, i in a.signature.parameters.items():
      4             print (pgn, an, i.qiime_type)
----> 5             list(i.qiime_type)

~/miniconda3/envs/qiime2-2018.4/lib/python3.5/site-packages/qiime2/core/type/grammar.py in __iter__(self)
    263     def __iter__(self):
    264         yield from set(self._apply_fields_(fields=fields)
--> 265                        for fields in itertools.product(*self.fields))
    266 
    267     def is_concrete(self):

~/miniconda3/envs/qiime2-2018.4/lib/python3.5/site-packages/qiime2/core/type/grammar.py in __iter__(self)
    263     def __iter__(self):
    264         yield from set(self._apply_fields_(fields=fields)
--> 265                        for fields in itertools.product(*self.fields))
    266 
    267     def is_concrete(self):

~/miniconda3/envs/qiime2-2018.4/lib/python3.5/site-packages/qiime2/core/type/grammar.py in <genexpr>(.0)
    263     def __iter__(self):
    264         yield from set(self._apply_fields_(fields=fields)
--> 265                        for fields in itertools.product(*self.fields))
    266 
    267     def is_concrete(self):

~/miniconda3/envs/qiime2-2018.4/lib/python3.5/site-packages/qiime2/core/type/grammar.py in _apply_fields_(self, fields)
    168     def _apply_fields_(self, fields):
    169         return self.__class__(self.name, fields=fields,
--> 170                               predicate=self.predicate)
    171 
    172     def __contains__(self, value):

TypeError: __init__() missing 1 required positional argument: 'view'
ebolyen commented 6 years ago

Closing in favor of: https://github.com/qiime2/qiime2/issues/403