The system breaks completely if history involving a command that no longer exists is requested. This can be an issue if commands are deleted or renamed.
```
adminware> batch history
Traceback (most recent call last):
File "src/adminware", line 7, in
adminware()
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/tmp/adminware/src/appliance_cli/sandbox.py", line 27, in sandbox
allow_internal_commands=False,
File "/tmp/adminware/venv/src/click-repl/click_repl/__init__.py", line 194, in repl
group.invoke(ctx)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/tmp/adminware/src/commands/batch.py", line 68, in history
for batch in query.all():
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 2836, in all
return list(self)
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/orm/loading.py", line 98, in instances
util.raise_from_cause(err)
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 249, in reraise
raise value
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/orm/loading.py", line 79, in instances
rows = [proc(row) for row in fetch]
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/orm/loading.py", line 79, in
rows = [proc(row) for row in fetch]
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/orm/loading.py", line 516, in _instance
state.manager.dispatch.load(state, context)
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/event/attr.py", line 284, in __call__
fn(*args, **kw)
File "/tmp/adminware/venv/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 3129, in _event_on_load
instrumenting_mapper._reconstructor(state.obj())
File "/tmp/adminware/src/models/batch.py", line 37, in __load
self.__init_or_load()
File "/tmp/adminware/src/models/batch.py", line 40, in __init_or_load
self.config_model = Config(self.config)
File "/tmp/adminware/src/models/config.py", line 10, in __init__
self.data = __read_data()
File "/tmp/adminware/src/models/config.py", line 8, in __read_data
with open(self.path, 'r') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/adminware/tools/batch/deeper_test/deeper_test3/test_cmd11/config.yaml'
```
The system breaks completely if history involving a command that no longer exists is requested. This can be an issue if commands are deleted or renamed.