standardebooks / tools

The Standard Ebooks toolset for producing our ebook files.
Other
1.42k stars 125 forks source link

Installation issue - missing gitdb? #246

Closed irontigran closed 4 years ago

irontigran commented 4 years ago

I attempted to install the toolset on a clean Ubuntu 18.04 machine; when I finished the process and attempted to run se -v, I got the following error:

Traceback (most recent call last):
  File "/home/vagrant/.local/bin/se", line 5, in <module>
    from se.executables import main
  File "/home/vagrant/.local/pipx/venvs/standardebooks/lib/python3.6/site-packages/se/executables.py", line 26, in <module>
    from se.se_epub import SeEpub
  File "/home/vagrant/.local/pipx/venvs/standardebooks/lib/python3.6/site-packages/se/se_epub.py", line 18, in <module>
    import git
  File "/home/vagrant/.local/pipx/venvs/standardebooks/lib/python3.6/site-packages/git/__init__.py", line 38, in <module>
    from git.config import GitConfigParser  # @NoMove @IgnorePep8
  File "/home/vagrant/.local/pipx/venvs/standardebooks/lib/python3.6/site-packages/git/config.py", line 16, in <module>
    from git.compat import (
  File "/home/vagrant/.local/pipx/venvs/standardebooks/lib/python3.6/site-packages/git/compat.py", line 16, in <module>
    from gitdb.utils.compat import (
ModuleNotFoundError: No module named 'gitdb.utils.compat'

After some poking around, I managed to make se -v run correctly by running python3 -m pip install gitdb inside the virtual environment. Perhaps this should be added to the required packages list?

Context: I'm using vagrant to create a VM with the toolset installed, but I verified the issue manually as well.

acabal commented 4 years ago

Looks like the pip gitpython package is missing a dependency? This is probably something to bring up with gitpython. I haven't heard of anyone running in to this error before, nor have I and I recently had to reinstall the tools myself.

robinwhittleton commented 4 years ago

I just had to do a rebuild with pipx due to a slightly problematic upgrade to fish 3.1, and I’m getting the same error. I’d put it down to macOS or fish, were it not for the fact that the original message is from someone with Ubuntu and (I guess) bash. Maybe it’s a problem with a recent commit?

acabal commented 4 years ago

Huh, testing failed with this same error just now on Github. No idea what has changed, the dependency versions are frozen.

robinwhittleton commented 4 years ago

Bumping gitpython locally to 3.0.8 seemed to fix the issue (3 was a major version over 2 because they dropped python2 support).

acabal commented 4 years ago

I think this issue is a hint: https://github.com/gitpython-developers/GitPython/issues/908

Looks like the release of 3.0.8 was just a few hours ago. The mystery is why a new release of the package screws up a fixed install of 2.1.5. Let me see if bumping our required version fixes it.

acabal commented 4 years ago

OK I bumped the required gitpython version to 3.0.8 and that seems to have solved the problem. Maybe pipx inject standardebooks gitdb might work to fix your install; otherwise clone from the repo head and install that way.

Harmon758 commented 4 years ago

See https://github.com/gitpython-developers/GitPython/issues/983.