New issue
Advanced search Search tips

Issue 903469 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Error when parsing List(Enum(...))

Project Member Reported by juliehockett@google.com, Nov 8

Issue description

Setting a property on a recipe to be a List of Enum like so: 

MYENUM = ['x', 'y']

PROPERTIES = {
    'list_of_enums':
        Property(
            kind=List(Enum(*MYENUM)),
            default=MYENUM)
}

yields the following error: 

Traceback (most recent call last):
  File "/b/s/w/ir/kitchen-checkout/recipe_engine/recipe_engine/run.py", line 287, in _new_run
    recipe_result = recipe_script.run(api, self.properties, self.environ)
  File "/b/s/w/ir/kitchen-checkout/recipe_engine/recipe_engine/loader.py", line 108, in run
    self.run_steps, properties, environ, self.PROPERTIES, api=api)
  File "/b/s/w/ir/kitchen-checkout/recipe_engine/recipe_engine/loader.py", line 636, in invoke_with_properties
    arg_names, **additional_args)
  File "/b/s/w/ir/kitchen-checkout/recipe_engine/recipe_engine/loader.py", line 597, in _invoke_with_properties
    prop.interpret(all_props.get(prop_name, PROPERTY_SENTINEL), environ))
  File "/b/s/w/ir/kitchen-checkout/recipe_engine/recipe_engine/recipe_api.py", line 1202, in interpret
    self.kind.set_val(value)
  File "/b/s/w/ir/kitchen-checkout/recipe_engine/recipe_engine/config.py", line 690, in set_val
    typeAssert(v, self.inner_type)
  File "/b/s/w/ir/kitchen-checkout/recipe_engine/recipe_engine/config.py", line 83, in typeAssert
    if not isinstance(obj, typearg):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types


 
Status: Available (was: Untriaged)

Sign in to add a comment