salt icon indicating copy to clipboard operation
salt copied to clipboard

Error while installing GitPython

Open ronak2303 opened this issue 6 years ago • 8 comments

Description of Issue

i am trying to install GitPython for to handle my git repository. i also have tried installing python3 and pip3 but still same error. error i am getting as below.

      ID: GitPython
Function: pip.installed
    Name: GitPython < 2.0.9
  Result: False
 Comment: An exception occurred in this state: Traceback (most recent call last):
            File "/usr/lib/python2.7/site-packages/salt/state.py", line 1933, in call
              **cdata['kwargs'])
            File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1951, in wrapper
              return f(*args, **kwargs)
            File "/usr/lib/python2.7/site-packages/salt/states/pip_state.py", line 812, in installed
              **kwargs)
            File "/usr/lib/python2.7/site-packages/salt/states/pip_state.py", line 314, in _check_if_installed
              for version in reversed(available_versions):
          TypeError: argument to reversed() must be a sequence
 Started: 14:36:48.336599
Duration: 368473.146 ms
 Changes:

Setup

i have top.sls with below code. base: 'wh-*': - gitsetup

i have my gitsetup.sls as below. git: pkg.installed

GitPython: pip.installed: - name: GitPython < 2.0.9 - proxy: http://<> - upgrade: True

Steps to Reproduce Issue

above is the code i have and its keep failing.

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

Salt Version: Salt: 2019.2.4

Dependency Versions: cffi: 1.14.1 cherrypy: unknown dateutil: 1.5 docker-py: Not Installed gitdb: 4.0.5 gitpython: Not Installed ioflo: Not Installed Jinja2: 2.7.2 libgit2: Not Installed libnacl: Not Installed M2Crypto: 0.21.1 Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.5.6 mysql-python: Not Installed pycparser: 2.20 pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: Not Installed Python: 2.7.5 (default, Jun 11 2019, 14:33:56) python-gnupg: Not Installed PyYAML: 3.10 PyZMQ: 15.3.0 RAET: Not Installed smmap: 3.0.4 timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.1.4

System Versions: dist: redhat 7.7 Maipo locale: UTF-8 machine: x86_64 release: 3.10.0-1062.4.3.el7.x86_64 system: Linux version: Red Hat Enterprise Linux Server 7.7 Maipo

all master and minion on same version

Master: 2019.2.4 Up to date: ---------- minion1: 2019.2.4 minion2: 2019.2.4 minon3: -- this is master as well. 2019.2.4

ronak2303 avatar Jul 28 '20 14:07 ronak2303

Does this work for you?

GitPython:
  pip.installed:
   - name: GitPython < 2.0.9
   - upgrade: True

cmcmarrow avatar Jul 28 '20 19:07 cmcmarrow

@ronak2303 I could not reproduce this. I tried on master and 19.2.3.3 Do you have your proxy setup right?

cmcmarrow avatar Jul 28 '20 19:07 cmcmarrow

@ronak2303 I could not reproduce this. I tried on master and 19.2.3.3 Do you have your proxy setup right?

hi cmcmarrow, our servers are not exposed to internet to without proxy i get same error. when i tried first time it worked without error, i do not have output of it. but when i tried to run to make sure i have latest i started getting this error.

  ID: GitPython

Function: pip.installed Name: GitPython < 2.0.9 Result: False Comment: An exception occurred in this state: Traceback (most recent call l ast): File "/usr/lib/python2.7/site-packages/salt/state.py", line 1933 , in call **cdata['kwargs']) File "/usr/lib/python2.7/site-packages/salt/loader.py", line 195 1, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/salt/states/pip_state.py" , line 812, in installed **kwargs) File "/usr/lib/python2.7/site-packages/salt/states/pip_state.py" , line 314, in _check_if_installed for version in reversed(available_versions): TypeError: argument to reversed() must be a sequence Started: 20:32:06.827795 Duration: 368637.515 ms Changes:

ronak2303 avatar Jul 29 '20 20:07 ronak2303

@ronak2303 I could not reproduce this. I tried on master and 19.2.3.3 Do you have your proxy setup right?

hi McMarrow, i was able to reproduce this by below step on other server. 1st ) i ran the script 2 time to make sure that GitPython installed. 2nd ) i put gitfs entry in master file /etc/salt/master and restart salt master. once i restart i see "No suitable gitfs provider module is installed" when i do systemctl status salt.master 3rd) then i remove entry for gitfs from /etc/salt/master and restart salt master again, 4th ) i try to run same code again to have GitPython again and error appears.

i am running python 2.7 and linux 7.7

ronak2303 avatar Aug 05 '20 12:08 ronak2303

@ronak2303 I tried your steps to reproduce. Still no luck :( Next I will install readhat 7.7 and python 2.7.5`.

Salt Version:
           Salt: 2019.2.2.4
 
Dependency Versions:
           cffi: 1.12.3
       cherrypy: unknown
       dateutil: 2.8.0
      docker-py: 4.0.2
          gitdb: 0.6.4
      gitpython: 2.1.15
          ioflo: 1.7.5
         Jinja2: 2.10.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.17 (default, Nov  7 2019, 10:07:09)
   python-gnupg: 0.4.4
         PyYAML: 3.13
          PyZMQ: 18.0.2
           RAET: Not Installed
          smmap: 3.0.4
        timelib: 0.2.4
        Tornado: 5.1.1
            ZMQ: 4.3.1
 
System Versions:
           dist: Ubuntu 19.10 eoan
         locale: UTF-8
        machine: x86_64
        release: 5.3.0-64-generic
         system: Linux
        version: Ubuntu 19.10 eoan

cmcmarrow avatar Aug 05 '20 17:08 cmcmarrow

@ronak2303 let me know if you are willing to setting up a call between you and @cmcmarrow so he can reproduce and get this fixed. I am happy to help coordinate.

sagetherage avatar Aug 05 '20 18:08 sagetherage

@cmcmarrow I believe this issue comes from some unresolved dependencies with the gitdb and gitdb2 libraries not being installed properly. I worked through this and was eventually able to solve by uninstall GitPython, gitdb, and gitdb2. Then I installed the latest version of GitPython.

These steps were taken according to the information I found here.

doesitblend avatar Aug 10 '20 22:08 doesitblend

@ronak2303 I heard Ken was able to help you with your problem. For now I will close the issue but if you still need help you I believe you can reopen it.

cmcmarrow avatar Aug 10 '20 22:08 cmcmarrow