Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stestr shell help doesn't work #144

Open
mtreinish opened this issue Feb 23, 2018 · 3 comments
Open

stestr shell help doesn't work #144

mtreinish opened this issue Feb 23, 2018 · 3 comments

Comments

@mtreinish
Copy link
Owner

When running the stestr shell (by just running stestr with no commands) the help command doesn't work for any of the commands. For example:

(stestr) help failing
Traceback (most recent call last):
  File "/home/computertreker/.venvs/venv2/lib/python2.7/site-packages/cmd2.py", line 786, in onecmd_plus_hooks
    stop = self.onecmd(statement)
  File "/home/computertreker/.venvs/venv2/lib/python2.7/site-packages/cmd2.py", line 974, in onecmd
    stop = func(statement)
  File "/home/computertreker/.venvs/venv2/lib/python2.7/site-packages/cliff/interactive.py", line 114, in do_help
    self.default(self.parsed('help ' + arg))
AttributeError: InteractiveApp instance has no attribute 'parsed'
EXCEPTION of type 'AttributeError' occurred with message: 'InteractiveApp instance has no attribute 'parsed''
To enable full traceback, run the following command:  'set debug true
@masayukig
Copy link
Collaborator

FYI.
I was thinking this is related to #145 issue. But when I changed this to cmd2 0.7.9, it still happened..

Another related thing:

cmd2: 0.8.0
$ stestr
(stestr) help 
ERROR: Invalid syntax: list.remove(x): x not in list
cmd2: 0.7.9 (works well)
(stestr) help

Shell commands (type help <topic>):
===================================
cmdenvironment  exit  history  py        quit  save  shell      show
edit            help  load     pyscript  run   set   shortcuts

Application commands (type help <topic>):
=========================================
complete  failing  help  init  last  list  load  run  slowest

@masayukig
Copy link
Collaborator

masayukig commented Feb 27, 2018

This seems like not stestr issue.. (cliff's issue?)

$ cliffdemo
(cliffdemo) help file
EXCEPTION of type 'AttributeError' occurred with message: 'InteractiveApp instance has no attribute 'parsed''
To enable full traceback, run the following command:  'set debug true'
(cliffdemo) set debug true
debug - was: False
now: True
(cliffdemo) help file
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/cmd2.py", line 981, in onecmd_plus_hooks
    stop = self.onecmd(statement)
  File "build/bdist.linux-x86_64/egg/cmd2.py", line 1179, in onecmd
    stop = func(statement)
  File "/home/masayuki/git/openstack/cliff/.venv/lib/python2.7/site-packages/cliff-2.11.0-py2.7.egg/cliff/interactive.py", line 114, in do_help
    self.default(self.parsed('help ' + arg))
AttributeError: InteractiveApp instance has no attribute 'parsed'
EXCEPTION of type 'AttributeError' occurred with message: 'InteractiveApp instance has no attribute 'parsed''
To enable full traceback, run the following command:  'set debug true'

@masayukig
Copy link
Collaborator

Now, this works on python2.7 but not on 3.7.. :(

$ python --version
Python 2.7.16
(stestr) help failing
usage: failing [-h] [--subunit] [--list]

Show the current failures known by the repository. Without --subunit, the
<snip>
$ python --version
Python 3.7.3
$ stestr
(stestr) set debug true
debug - was: False
now: True
(stestr) help failing
Traceback (most recent call last):
  File "/home/masayuki/git/stestr/.tox/py37/lib/python3.7/site-packages/cmd2/cmd2.py", line 1750, in onecmd_plus_hooks
    statement = self.precmd(statement)
  File "/home/masayuki/git/stestr/.tox/py37/lib/python3.7/site-packages/cliff/interactive.py", line 172, in precmd
    statement.command = cmd_name
  File "/home/masayuki/git/stestr/.tox/py37/lib/python3.7/site-packages/attr/_make.py", line 428, in _frozen_setattrs
    raise FrozenInstanceError()
attr.exceptions.FrozenInstanceError
EXCEPTION of type 'FrozenInstanceError' occurred with message: ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants