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

dbshell_plus does not use virtualenv mycli and pygments, defaults to system version #4

Open
jontsai opened this issue May 28, 2019 · 0 comments · May be fixed by #5
Open

dbshell_plus does not use virtualenv mycli and pygments, defaults to system version #4

jontsai opened this issue May 28, 2019 · 0 comments · May be fixed by #5

Comments

@jontsai
Copy link

jontsai commented May 28, 2019

In my Django application, when I launch dbshell_plus, it seems to use the system mycli and not the one in virtualenv. When I uninstall the system mycli, a regular mysql client is started.

Additionally, dbshell_plus does not respect the mycli and Pygments in the virtualenv.

$ venv/bin/python manage.py dbshell_plus
Traceback (most recent call last):
  File "/usr/local/bin/mycli", line 7, in <module>
    from mycli.main import cli
  File "/usr/local/lib/python2.7/dist-packages/mycli/main.py", line 44, in <module>
    from .lexer import MyCliLexer
  File "/usr/local/lib/python2.7/dist-packages/mycli/lexer.py", line 1, in <module>
    from pygments.lexer import inherit
ImportError: cannot import name inherit

The issue is here:

The subprocess.call is invoked with args, which naively just uses pgcli or mycli, but does not detect whether it should use the path in virtualenv or not.

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

Successfully merging a pull request may close this issue.

1 participant