Tomas Garzon
unread,Oct 3, 2011, 11:42:08 AM10/3/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to api-11870
Hola, estoy utilizando la api oosapy para python. Estoy autenticado
utilizando las funciones OAuth, y puedo acceder a las búsquedas. El
problema lo tengo cuando a continuación hago una llamada a get_service
de la api (o lo que es lo mismo, al site-details), lo hago sobre un
slug que existe y el sistema me devuelve Authentication Error. Tengo
las licencias correctamente, por que me está dejando hacer el search.
Por favor, me podrían ayudar con el problema:
el slug del site es : 'hotel-restaurante-las-letras'
In [13]: api.api.get_service(slug)
---------------------------------------------------------------------------
OosApyError Traceback (most recent call
last)
/home/tomas/Aptana Studio 3 Workspace/nativoo/trunk/contenedor/
<ipython console> in <module>()
/usr/lib/python2.6/oosapy/api.pyc in get_service(self, slug)
213 """Return the information of a service."""
214 url = self.ROOT_URL + "/site-details/" + slug
--> 215 resp = self.auth_handler.get_response(url)
216 services = models.Service.parse(self, resp[1])
217 return services[0]
/usr/lib/python2.6/oosapy/auth.pyc in get_response(self, url, method,
body, headers, parameters)
150 heads.update(request.to_header())
151 resp = self.connection.request(url, method, body,
heads)
--> 152 _check_response(resp)
153 return resp
154
/usr/lib/python2.6/oosapy/auth.pyc in _check_response(resp)
46 raise OosApyError("Bad request", resp)
47 elif status == 401:
---> 48 raise OosApyError("Authentication error", resp)
49 elif status == 403:
50 raise OosApyError(get_message(resp[1]), resp)