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

Linchpin clean installation with Python 3 requires pymongo #1503

Closed
abraverm opened this issue Dec 2, 2019 · 0 comments · Fixed by #1506
Closed

Linchpin clean installation with Python 3 requires pymongo #1503

abraverm opened this issue Dec 2, 2019 · 0 comments · Fixed by #1506
Assignees
Labels
Milestone

Comments

@abraverm
Copy link
Contributor

abraverm commented Dec 2, 2019

Describe the bug
linchpin up fails on missing pymongo module:

Traceback (most recent call last):
  File "/opt/linchpin3/.venv/bin/linchpin", line 11, in <module>
    load_entry_point('linchpin', 'console_scripts', 'linchpin')()
  File "/opt/linchpin3/.venv/lib64/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/opt/linchpin3/.venv/lib64/python3.7/site-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/opt/linchpin3/.venv/lib64/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/opt/linchpin3/.venv/lib64/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/linchpin3/linchpin/__init__.py", line 23, in <module>
    from linchpin.rundb.drivers import DB_DRIVERS
  File "/opt/linchpin3/linchpin/rundb/drivers.py", line 4, in <module>
    from .mongodb import MongoDB
  File "/opt/linchpin3/linchpin/rundb/mongodb.py", line 10, in <module>
    from pymongo import MongoClient, DESCENDING
ModuleNotFoundError: No module named 'pymongo'

To Reproduce
Steps to reproduce the behavior:

  1. Create python 3 virtual env python3 -m venv .venv
  2. Install linchpin from repo: pip install -e .
  3. Run linchpin up

Expected behavior
If mongo driver is not used then it shouldn't be imported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants