You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The "call" and "call_silent" methods are not working as expected #130
When I'm calling the foo command itself, it works:
$ python app.py foo baz
baz
But when I'm calling the bar command, I'm getting this:
$ python app.py bar
Not enough arguments (missing: "baz")
If I replace self.call by self.call_silent that's the error:
$ python app.py bar
AttributeError
'builtin_function_or_method' object has no attribute 'bind'
at ~/Library/Caches/pypoetry/virtualenvs/app-wSCSi1z6-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:103 in run
99│ def run(self, io: IO) -> int:
100│ self.merge_application_definition()
101│
102│ try:
→ 103│ io.input.bind(self.definition)
104│ except CleoException:
105│ if not self._ignore_validation_errors:
106│ raise
107│
Activity
qezz commentedon Jan 30, 2022
Faced the same issue today. Found out that in
call()cleo parses the arguments differently, e.g.leads to the internal representation as
though, when I call it from the terminal, the representation is:
Eventually, I made it work with the following hack:
So, apparently the first word of the arguments is meaningless when calling a command.
fix: command help not showing due to python-poetry/cleo/issues/130
fix: command help not showing due to python-poetry/cleo/issues/130