MycroftAI / mycroft-skills-kit

Mycroft Skills Kit
Apache License 2.0
28 stars 12 forks source link

ImportError: cannot import name 'get_config_path' from 'git.config' (/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/git/config.py) #46

Closed brezuicabogdan closed 4 years ago

brezuicabogdan commented 4 years ago

I get the following error when I try to run msk submit. It worked fine for msk create a few days ago but now get this error every time I execute msk - not just for submit.

I tried:

  1. updating Mycroft including re-duning dev_setup.sh
  2. upgrading system (apt-get5 update apt-get upgrade)

Not sure this is a bug - I am more inclined to think this is something related tio my Picroft configuration. Can anyone help please? Thank you!

(.venv) pi@picroft:/opt/mycroft/skills/quiet-hours-skill $ mycroft-msk submit .
Traceback (most recent call last):
  File "/home/pi/mycroft-core/.venv/bin/msk", line 5, in <module>
    from msk.__main__ import main
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/msk/__main__.py", line 23, in <module>
    from msk.actions.create import CreateAction
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/msk/actions/create.py", line 34, in <module>
    from msk.console_action import ConsoleAction
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/msk/console_action.py", line 21, in <module>
    from msk.global_context import GlobalContext
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/msk/global_context.py", line 23, in <module>
    from msk.util import ask_for_github_token
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/msk/util.py", line 25, in <module>
    from git.config import GitConfigParser, get_config_path
ImportError: cannot import name 'get_config_path' from 'git.config' (/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/git/config.py)
brezuicabogdan commented 4 years ago

Some package versions information - may be helpful.

(.venv) pi@picroft:~/mycroft-core $ pip show msk
Name: msk
Version: 0.3.15
Summary: Mycroft Skills Kit
Home-page: https://github.com/MycroftAI/mycroft-skills-kit
Author: Mycroft AI
Author-email: support@mycroft.ai
License: Apache-2.0
Location: /home/pi/mycroft-core/.venv/lib/python3.7/site-packages
Requires: requests, typing, colorama, msm, GitPython, pygithub
Required-by:
(.venv) pi@picroft:~/mycroft-core $ pip show GitPython
Name: GitPython
Version: 3.0.3
Summary: Python Git Library
Home-page: https://github.com/gitpython-developers/GitPython
Author: Sebastian Thiel, Michael Trier
Author-email: byronimo@gmail.com, mtrier@gmail.com
License: BSD License
Location: /home/pi/mycroft-core/.venv/lib/python3.7/site-packages
Requires: gitdb2
Required-by: msm, msk
(.venv) pi@picroft:~/mycroft-core $ pip show pygithub
Name: PyGithub
Version: 1.43.8
Summary: Use the full Github API v3
Home-page: http://pygithub.readthedocs.io/en/latest/
Author: Vincent Jacques
Author-email: vincent@vincent-jacques.net
License: UNKNOWN
Location: /home/pi/mycroft-core/.venv/lib/python3.7/site-packages
Requires: pyjwt, deprecated, requests
Required-by: msk
forslund commented 4 years ago

Hi, the latest release adds a requirement of GitPython >= 3.0.5, not sure why it wasn't installed for you. You should be able to get it going by running pip install --upgrade GitPython I will do a test here to see if there is an issue with the requirements when doing an install.

brezuicabogdan commented 4 years ago

Thank you @forslund - this indeed fixed my issue.