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

toml package requirement missing to run invoke start #602

Closed
tim-fiola opened this issue Jun 21, 2021 · 1 comment · Fixed by #607
Closed

toml package requirement missing to run invoke start #602

tim-fiola opened this issue Jun 21, 2021 · 1 comment · Fixed by #607
Assignees
Labels
type: bug Something isn't working as expected type: documentation Improvements or additions to documentation

Comments

@tim-fiola
Copy link
Contributor

Environment

  • Python version: 3.6
  • Nautobot version: 1.0.2

Steps to Reproduce

  1. Work through docs to this step https://nautobot.readthedocs.io/en/latest/development/getting-started/#using-docker-with-invoke
  2. invoke start

Expected Behavior

Containers to start

Observed Behavior

nautobot_blog/nautobot % docker ps                                                                                                                                     (tim-fiola-doc-blog)nautobot
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
nautobot_blog/nautobot % invoke start                                                                                                                                  (tim-fiola-doc-blog)nautobot
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/invoke", line 10, in <module>
    sys.exit(program.run())
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/invoke/program.py", line 373, in run
    self.parse_collection()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/invoke/program.py", line 465, in parse_collection
    self.load_collection()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/invoke/program.py", line 696, in load_collection
    module, parent = loader.load(coll_name)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/invoke/loader.py", line 76, in load
    module = imp.load_module(name, fd, path, desc)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 702, in _load
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/timothyfiola/nautobot_blog/nautobot/tasks.py", line 21, in <module>
    import toml
ModuleNotFoundError: No module named 'toml'
nautobot_blog/nautobot %

When I installed toml it worked:

nautobot_blog/nautobot % pip3 install toml                                                                                                                             (tim-fiola-doc-blog)nautobot
Collecting toml
  Using cached https://files.pythonhosted.org/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl
Installing collected packages: toml
Successfully installed toml-0.10.2
WARNING: You are using pip version 19.2.3, however version 21.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
nautobot_blog/nautobot % invoke start                                                                                                                                  (tim-fiola-doc-blog)nautobot
Starting Nautobot in detached mode...
Running docker-compose command "up --detach"
Starting nautobot_redis_1 ... 
Starting nautobot_postgres_1 ... 
Starting nautobot_selenium_1 ... 
Starting nautobot_redis_1    ... done
Starting nautobot_postgres_1 ... done
Starting nautobot_selenium_1 ... done
Creating nautobot_nautobot_1 ... 
Creating nautobot_nautobot_1 ... done
Creating nautobot_worker_1   ... 
Creating nautobot_worker_1   ... done
Docker Compose is now in the Docker CLI, try `docker compose up`

nautobot_blog/nautobot % docker ps                                                                                                                                     (tim-fiola-doc-blog)nautobot
CONTAINER ID   IMAGE                                    COMMAND                  CREATED          STATUS          PORTS                                       NAMES
f3e8d212def6   networktocode/nautobot-dev-py3.6:local   "nautobot-server rqw…"   9 seconds ago    Up 6 seconds                                                nautobot_worker_1
05288a0f9a42   networktocode/nautobot-dev-py3.6:local   "/docker-entrypoint.…"   12 seconds ago   Up 8 seconds    0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   nautobot_nautobot_1
acb66838a128   selenium/standalone-firefox:latest       "/opt/bin/entry_poin…"   13 days ago      Up 11 seconds   0.0.0.0:4444->4444/tcp, :::4444->4444/tcp   nautobot_selenium_1
bfa31d49664b   postgres:13                              "docker-entrypoint.s…"   13 days ago      Up 13 seconds   5432/tcp                                    nautobot_postgres_1
dc0c3c356593   redis:6-alpine                           "docker-entrypoint.s…"   13 days ago      Up 13 seconds   6379/tcp                                    nautobot_redis_1
nautobot_blog/nautobot %                    

I can update the docs to reflect this

@glennmatthews
Copy link
Contributor

Good catch!

Personally, I think rather than updating the docs it would be ideal to fix tasks.py - the only task that actually requires the toml library is the docker_push task, which is intended mostly for CI usage; none of the user-facing tasks need it.

This issue appears to have been introduced by #195.

@glennmatthews glennmatthews added type: bug Something isn't working as expected type: documentation Improvements or additions to documentation status: accepted labels Jun 21, 2021
@jathanism jathanism self-assigned this Jun 22, 2021
glennmatthews added a commit that referenced this issue Jun 29, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected type: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants