Skip to content

AttributeError: 'Promise' object has no attribute 'exited' #742

@shvechikov

Description

@shvechikov

I'm trying to run a trivial example of asynchronous execution:
run("sleep 1", asynchronous=True)

I'm getting the following traceback:

[ins] In [2]: run("sleep 1", asynchronous=True)
Out[2]: ---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/usr/local/lib/python3.7/site-packages/IPython/core/formatters.py in __call__(self, obj)
    700                 type_pprinters=self.type_printers,
    701                 deferred_pprinters=self.deferred_printers)
--> 702             printer.pretty(obj)
    703             printer.flush()
    704             return stream.getvalue()

/usr/local/lib/python3.7/site-packages/IPython/lib/pretty.py in pretty(self, obj)
    400                         if cls is not object \
    401                                 and callable(cls.__dict__.get('__repr__')):
--> 402                             return _repr_pprint(obj, self, cycle)
    403
    404             return _default_pprint(obj, self, cycle)

/usr/local/lib/python3.7/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
    695     """A pprint that just redirects to the normal repr function."""
    696     # Find newlines and replace them with p.break_()
--> 697     output = repr(obj)
    698     for idx,output_line in enumerate(output.splitlines()):
    699         if idx:

/usr/local/lib/python3.7/site-packages/invoke/runners.py in __repr__(self)
   1466         # represents
   1467         template = "<Result cmd={!r} exited={}>"
-> 1468         return template.format(self.command, self.exited)
   1469
   1470     @property

AttributeError: 'Promise' object has no attribute 'exited'

I'm able to reproduce it on both MacOS 10.15.4 + Python 3.7.5 and Ubuntu 16.04.4 + Python 3.7.1

(Relates to #682 feature).

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