reingart / pyafipws

Factura Electrónica AFIP y otros servicios web (proyecto software libre) — Interfases, tools and apps for Argentina's gov't. webservices (soap, com/dll simil-ocx, pdf, dbf, xml, json, etc.) #python
http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs
GNU Lesser General Public License v3.0
292 stars 229 forks source link

TypeError: _ssl_wreap_socket() takes exactly 5 arguments (7 given) #64

Open pazmarianoj opened 5 years ago

pazmarianoj commented 5 years ago

La libreria tiene una dependencia rota con httplib2, cualquier version por arriba de 0.9.2 rompe al querer usar el script de webservice.

Leyendo TA de /home/ec2-user/pyafipws/cache/TA-cb4ab4e307fef41bf4cd106e8303cae0.xml...
/home/ec2-user/pyafipws/utils.py:315: UserWarning: Proxy Dict: {}
  warnings.warn(msg)
/home/ec2-user/pyafipws/utils.py:315: UserWarning: Conectando a wsdl=https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA5?wsdl cache=/home/ec2-user/pyafipws/cache proxy={}
  warnings.warn(msg)
Consultando AFIP online via webservice...
Traceback (most recent call last):
  File "./ws_sr_padron.py", line 379, in <module>
    main()
  File "./ws_sr_padron.py", line 338, in main
    ok = padron.Consultar(id_persona)
  File "/home/ec2-user/pyafipws/utils.py", line 158, in capturar_errores_wrapper
    return func(self, *args, **kwargs)
  File "./ws_sr_padron.py", line 198, in Consultar
    idPersona=id_persona,
  File "/usr/local/lib/python2.7/site-packages/pysimplesoap/client.py", line 147, in <lambda>
    return lambda *args, **kwargs: self.wsdl_call(attr,*args,**kwargs)
  File "/usr/local/lib/python2.7/site-packages/pysimplesoap/client.py", line 342, in wsdl_call
    response = self.call(method, *params)
  File "/usr/local/lib/python2.7/site-packages/pysimplesoap/client.py", line 216, in call
    self.xml_response = self.send(method, self.xml_request)
  File "/usr/local/lib/python2.7/site-packages/pysimplesoap/client.py", line 261, in send
    location, "POST", body=xml, headers=headers)
  File "/usr/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1659, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1399, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1319, in _conn_request
    conn.connect()
  File "/usr/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1069, in connect
    self.ssl_version, self.host)
TypeError: _ssl_wrap_socket() takes exactly 5 arguments (7 given)

Hice la prueba con httplib2 v: 0.10.3, 0.11.0, 0.11.1, 0.11.3, 0.12.0, 0.12.1

joarobles commented 5 years ago

Pude reproducirlo con la versión 0.12.3 de httplib2, Específicamente en el archivo requirements.txt se indica:

httplib2>=0.7

Puede ser solucionado instalando específicamente la versión 0.9.2 usando:

pip install httplib2==0.9.2