mvexel / overpass-api-python-wrapper

Python bindings for the OpenStreetMap Overpass API
Apache License 2.0
360 stars 89 forks source link

TypeError: getresponse() got an unexpected keyword argument 'buffering' #82

Closed matkoniecz closed 6 years ago

matkoniecz commented 6 years ago

on timeout of extra-long query I got this error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 377, in _make_request
    httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'

code: https://gist.github.com/matkoniecz/ee2e01085dc9346377f57572c5b03876

mvexel commented 6 years ago

hm, not sure under which circumstances this is output.. Perhaps @mmd-osm can shed some light on this?

mmd-osm commented 6 years ago

I don't really know what this query is good for. For sure it is way too large for an HTTP GET request with its 108874 bytes. Pretty much any web server accepts at most ~ 2000-8000 characters for GET requests, it's an Apache config setting. Using HTTP POST is an absolute must for such monster queries.

@mvexel : my recommendation would be to update all examples to use post instead of get, like Overpass turbo already does by default.

matkoniecz commented 6 years ago

I don't really know what this query is good for

It was used to find some still present tagging errors (query was automatically generated from initial list of issues).

mvexel commented 6 years ago

I have captured defaulting to POST in #91. If that does not capture this case, I'm going to chalk it up as an outlier :)

matkoniecz commented 6 years ago

I would expect #91 to solve this.