Connection error with requests


#1

I get a connection error in the line sample_req.
But previous in my code the requests.get worked. So I don't get what is wrong with this.

sample_url = '{0}/sample?'.format(SERVICES_URL)

sample_args = {
'product': product['ProductAndVersion'],
'layer': product_layer['Layer'],
'startdate': '03-01-2005',
'enddate': '09-01-2005',
'coordinate': '{0},{1}'.format(latitude, longitude),
'format': 'json'
}

sample_req = requests.get(sample_url, params = sample_args)

samples = sample_req.json()


#2

this error: ConnectionError: ('Connection aborted.', BadStatusLine("''",))


#3

Never mind got it! I changed the dates to receive the data