Skip to content

No module named utils.compat #241

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

Closed
h4ck3rm1k3 opened this issue Jan 20, 2015 · 3 comments
Closed

No module named utils.compat #241

h4ck3rm1k3 opened this issue Jan 20, 2015 · 3 comments
Assignees

Comments

@h4ck3rm1k3
Copy link

Howdy,
I have the latest gitdb
https://github.com/gitpython-developers/gitdb
installed and then the latest gitpython, but I get this err.

Python 2.7.8 (default, Oct 18 2014, 12:50:18) 
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import git
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "git/__init__.py", line 34, in <module>
    from git.config import GitConfigParser
  File "git/config.py", line 21, in <module>
    from git.util import LockFile
  File "git/util.py", line 19, in <module>
    from .exc import GitCommandError
  File "git/exc.py", line 10, in <module>
    from git.compat import defenc
  File "git/compat.py", line 12, in <module>
    from gitdb.utils.compat import (
ImportError: No module named utils.compat
>>> 
@Byron Byron self-assigned this Jan 20, 2015
@Byron Byron added this to the v0.3.6 - Features milestone Jan 20, 2015
@Byron
Copy link
Member

Byron commented Jan 20, 2015

As you can see on github, the latest version of gitdb does indeed have the module in question, as does the latest version up on pypi.

Therefore I believe that python picks up an old installation of gitdb, that is up first in your PYTHONPATH.

You could try upgrading your current gitdb system installation to fix that, or remove the system wide installation alltogether.

Please close this ticket if you think that makes sense.

@h4ck3rm1k3
Copy link
Author

Yes, I did see that and was hesitant to file this bug.

>>> import gitdb
>>> gitdb
<module 'gitdb' from '/usr/lib/python2.7/dist-packages/gitdb/__init__.pyc'>

It turns out that it was in the debian package :
python-gitdb: /usr/lib/python2.7/dist-packages/gitdb/init.py

@Byron
Copy link
Member

Byron commented Jan 20, 2015

Thank you.
The archived live-development stream can be found in the first 5 minutes of this video on youtube

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

No branches or pull requests

2 participants