Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cannot pass BooleanParameter in as argument from commandline #193

@alexbw

Description

@alexbw

With a very simple class defined as:

import luigi
class TestBooleanParameter(luigi.Task):
    switch = luigi.BooleanParameter()

    def run(self):
        print self.switch

And run from the commandline as either

python test.py TestBooleanParameter --switch=True

or

python test.py TestBooleanParameter --switch=1

Fails with:

test.py TestBooleanParameter: error: argument --switch: ignored explicit argument 'True'

or, alternatively

test.py TestBooleanParameter: error: argument --switch: ignored explicit argument '1'

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