Skip to content

Example from « Using Invoke as a library » gives « AttributeError » #283

@zaiste

Description

@zaiste

Here's the code: https://github.com/zaiste/invoke-example-bug
I followed this tutorial: http://invoke.readthedocs.org/en/latest/concepts/library.html#reusing-as-a-binary

  1. Install the package with python setup.py install
  2. Execute tester

it returns:

Traceback (most recent call last):
  File "/usr/local/bin/tester", line 9, in <module>
    load_entry_point('tester==0.1.0', 'console_scripts', 'tester')()
  File "/usr/local/lib/python2.7/site-packages/invoke/program.py", line 246, in run
    self._parse(argv)
  File "/usr/local/lib/python2.7/site-packages/invoke/program.py", line 301, in _parse
    self.parse_tasks()
  File "/usr/local/lib/python2.7/site-packages/invoke/program.py", line 458, in parse_tasks
    self.parser = Parser(contexts=self.collection.to_contexts())
AttributeError: 'module' object has no attribute 'to_contexts'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions