If you attempt to do an invoke build without having the invoke.yml file it throws an error:
Traceback (most recent call last):
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/config.py", line 117, in __getattr__
return self._get(key)
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/config.py", line 177, in _get
value = self._config[key]
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/config.py", line 168, in __getitem__
return self._get(key)
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/config.py", line 177, in _get
value = self._config[key]
KeyError: 'nautobot_docker_compose'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/bin/invoke", line 8, in <module>
sys.exit(program.run())
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/program.py", line 398, in run
self.execute()
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/program.py", line 583, in execute
executor.execute(*self.tasks)
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/executor.py", line 140, in execute
result = call.task(*args, **call.kwargs)
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/tasks.py", line 138, in __call__
result = self.body(*args, **kwargs)
File "/Users/justin.drew/Projects/nautobot-docker-compose/tasks.py", line 128, in build
f"Building Nautobot {NAUTOBOT_VERSION} with Python {context.nautobot_docker_compose.python_ver}..."
File "/Users/justin.drew/Projects/nautobot-docker-compose/.venv/lib/python3.9/site-packages/invoke/config.py", line 129, in __getattr__
raise AttributeError(err)
AttributeError: No attribute or config key found for 'nautobot_docker_compose'
Valid keys: ['nautobot-docker-compose', 'run', 'runners', 'sudo', 'tasks', 'timeouts']
Valid real attributes: ['cd', 'clear', 'config', 'cwd', 'from_data', 'pop', 'popitem', 'prefix', 'run', 'setdefault', 'sudo', 'update']
This appears to be because the tasks.py has the context key as nautobot-docker-compose when it should be nautobot_docker_compose.
If you attempt to do an
invoke build
without having theinvoke.yml
file it throws an error:This appears to be because the tasks.py has the context key as
nautobot-docker-compose
when it should benautobot_docker_compose
.