#6999 ipa command throws backtrace instead of showing help with wrong syntax
Closed: fixed Opened by simo.

ipa help

ipa: ERROR: TypeError: 'NoneType' object has no attribute 'getitem'
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1351, in run
sys.exit(api.Backend.cli.run(argv))
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1105, in run
kw = self.parse(cmd, argv[1:])
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1125, in parse
parser = self.build_parser(cmd)
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1142, in build_parser
usage=' '.join(self.usage_iter(cmd)),
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1220, in usage_iter
for arg in cmd.args():
File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 255, in get
obj.ensure_finalized()
File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 230, in ensure_finalized
self.finalize()
File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 210, in finalize
self._on_finalize()
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 733, in _on_finalize
if c.NO_CLI:
File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 247, in NO_CLI
halp = self._schema[self.schema_key].get_help(self.full_name)
File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 329, in get_help
return self._schema.get_help(self.name, key)
File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 520, in get_help
return self._help[namespace][member]
TypeError: 'NoneType' object has no attribute 'getitem'
ipa: ERROR: an internal error has occurred


Metadata Update from @simo:
- Issue priority set to: blocker
- Issue tagged with: bug, regression

This was with what version?

This is actually an issue addressed in https://github.com/freeipa/freeipa/pull/701. If you issue ipa help again, the command works as expected, so this is a caching issue.

I think we can close this, since PR 701 fix it and it was merged.

master:

d5bb541 Store help in Schema before writing to disk
bf0ba9b Disable pylint in get_help function because of type confusion.

Metadata Update from @pvoborni:
- Issue close_status updated to: fixed
- Issue set to the milestone: FreeIPA 4.6
- Issue status updated to: Closed (was: Open)

Metadata Update from @pvoborni:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1477243

Metadata Update from @pvoborni:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1477243

Issue linked to bug 1477243

moving to 4.5 for backporting the patch https://github.com/freeipa/freeipa/pull/970

Metadata Update from @pvoborni:
- Issue set to the milestone: FreeIPA 4.5.4 (was: FreeIPA 4.6)
- Issue status updated to: Open (was: Closed)

ipa-4-5:

  • 9308e63fde736ea4274a280f18c83a4bc2935c81 Store help in Schema before writing to disk
  • 7352b731169e4f995b3ffe254b9e0cae6b82a763 Disable pylint in get_help function because of type confusion.

Metadata Update from @pvomacka:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata