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

Invoke Build Broken #76

Closed
jdrew82 opened this issue Jun 27, 2024 · 0 comments · Fixed by #77
Closed

Invoke Build Broken #76

jdrew82 opened this issue Jun 27, 2024 · 0 comments · Fixed by #77
Assignees

Comments

@jdrew82
Copy link
Contributor

jdrew82 commented Jun 27, 2024

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.

@jdrew82 jdrew82 self-assigned this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant