PyAr / pyafipws

Interfases, tools and apps for Argentina's gov't. webservices (soap, com/dll simil-ocx, pdf, dbf, xml, json, etc.) #python
https://github.com/PyAr/pyafipws/wiki/PyAr-PSF-GSoC-2019-Final-Summary
GNU Lesser General Public License v3.0
2 stars 15 forks source link

Computer not authorized error in ws_sr_padron.py #84

Closed chazuttu closed 3 years ago

chazuttu commented 3 years ago

Running the ws_sr_padron.py scripts return a pysimplesoap.client.SoapFault: ns1:coe.notAuthorized: Computador no autorizado a acceder al servicio error.

Complete error: $ ws_sr_padron

para soporte de WebClient debe instalar httplib2
Creando TRA...
Firmando TRA...
Conectando a WSAA...
Llamando WSAA...
Traceback (most recent call last):
  File "C:\Users\Desktop\GSoC_online\pyafipws\py3\Scripts\ws_sr_padron-script.py", line 33, in <module>
    sys.exit(load_entry_point('PyAfipWs===3.9.b-2522-', 'console_scripts', 'ws_sr_padron')())
  File "C:\Users\Desktop\GSoC_online\pyafipws\py3\lib\site-packages\pyafipws-3.9.b_2522_-py3.9.egg\pyafipws\ws_sr_padron.py", line 351, in main
    ta = WSAA().Autenticar(service, crt, key, url_wsaa)
  File "C:\Users\GSoC_online\pyafipws\py3\lib\site-packages\pyafipws-3.9.b_2522_-py3.9.egg\pyafipws\wsaa.py", line 469, in Autenticar
    ta = self.LoginCMS(cms)
  File "C:\Users\Desktop\GSoC_online\pyafipws\py3\lib\site-packages\pyafipws-3.9.b_2522_-py3.9.egg\pyafipws\utils.py", line 201, in capturar_errores_wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\Desktop\GSoC_online\pyafipws\py3\lib\site-packages\pyafipws-3.9.b_2522_-py3.9.egg\pyafipws\wsaa.py", line 391, in LoginCMS
    results = self.client.loginCms(in0=cms)
  File "C:\Users\Desktop\GSoC_online\pyafipws\py3\lib\site-packages\pysimplesoap\client.py", line 159, in <lambda>
    return lambda *args, **kwargs: self.wsdl_call(attr,*args,**kwargs)
  File "C:\Users\Desktop\GSoC_online\pyafipws\py3\lib\site-packages\pysimplesoap\client.py", line 354, in wsdl_call
    response = self.call(method, types, *params)
  File "C:\Users\Desktop\GSoC_online\pyafipws\py3\lib\site-packages\pysimplesoap\client.py", line 234, in call
    raise SoapFault(str(response.faultcode), str(response.faultstring))

pysimplesoap.client.SoapFault: ns1:coe.notAuthorized: Computador no autorizado a acceder al servicio
reingart commented 3 years ago

@chazuttu you need to use service='ws_sr_constancia_inscripcion' when creating the Access Ticket: Example:

python2 ws_sr_padron.py 20000000516 --constancia  --trace