esri-es / mobilitylab-emtmadrid

Laboratorios para la Movilidad de Madrid
http://esri-es.github.io/mobilitylab-emtmadrid/
8 stars 1 forks source link

Duda sobre BigData #4

Closed hhkaos closed 8 years ago

hhkaos commented 8 years ago

Ahora tengo problemas con el bigdata.py sacado de la documentación:

(lincore)➜  mobilitylab git:(master) ✗ python bigdata.py
Traceback (most recent call last):
  File "bigdata.py", line 15, in <module>
    response = requests.request("POST", url, data=query, headers=headers)
  File "/Users/hhkaos/.virtualenvs/lincore/lib/python2.7/site-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/hhkaos/.virtualenvs/lincore/lib/python2.7/site-packages/requests/sessions.py", line 357, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/hhkaos/.virtualenvs/lincore/lib/python2.7/site-packages/requests/sessions.py", line 460, in send
    r = adapter.send(request, **kwargs)
  File "/Users/hhkaos/.virtualenvs/lincore/lib/python2.7/site-packages/requests/adapters.py", line 354, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='rbdata.emtmadrid.es', port=8443): Max retries exceeded with url: /DataProvider/api/dmz/getCollection/test/@EMT123/Layers/SENPM25MAD.eventpos/ (Caused by <class 'socket.error'>: [Errno 54] Connection reset by peer)

Any ideas?

hhkaos commented 8 years ago

@anreciomar ? :)

anreciomar commented 8 years ago

Hi hhkaos, try this cod using the labtest user id:

url = "https://rbdata.emtmadrid.es:8443/DataProvider/api/dmz/getCollection/mobilitylabs.usertest/usertest/Layers/BUSTEST.eventpos/"

payload = "{ \"keyid\": \"9224\" }"

headers = { 'content-type': "application/json", 'cache-control': "no-cache"

}

response = requests.request("POST", url, data=payload, headers=headers, verify=False)

print(response.text)

hhkaos commented 8 years ago

Great :), resolved ^_^