Bug#951236: osmnx fails the remote autopkg test (access blocked)

2020-02-14 Thread Jerome BENOIT
Dear Matthias, thanks for your report.
I have just send an email to the Nominatim system administrator
to see what we can do.
Best,
Jerome

-- 
Jerome BENOIT | calculus+at-rezozer^dot*net
https://qa.debian.org/developer.php?login=calcu...@rezozer.net
AE28 AE15 710D FF1D 87E5  A762 3F92 19A6 7F36 C68B



signature.asc
Description: OpenPGP digital signature


Bug#951236: osmnx fails the remote autopkg test (access blocked)

2020-02-12 Thread Matthias Klose
Package: src:osmnx
Version: 0.11.4+ds-1
Severity: serious
Tags: sid bullseye

osmnx fails the remote autopkg test:

https://ci.debian.net/data/autopkgtest/testing/amd64/o/osmnx/4267399/log.gz

[...]
__ test_pois ___

def test_pois():
import pytest
# download all points of interests from place
gdf = ox.pois_from_place(place='Kamppi, Helsinki, Finland')

# get all restaurants and schools from place
restaurants = ox.pois_from_place(place='Emeryville, California, USA',
amenities=['restaurant'])
schools = ox.pois_from_place(place='Emeryville, California, USA',
amenities=['school'])

# get all universities from Boston area (with 2 km buffer to cover also
Cambridge)
boston_q = "Boston, Massachusetts, United States of America"
boston_poly = ox.gdf_from_place(boston_q, buffer_dist=2000)
universities = ox.pois_from_polygon(boston_poly.geometry.values[0],
amenities=['university'])

# by point and by address
restaurants = ox.pois_from_point(point=(42.344490, -71.070570),
distance=1000, amenities=['restaurant'])
>   restaurants = ox.pois_from_address(address='Emeryville, California,
USA', distance=1000, amenities=['restaurant'])

/usr/share/doc/python-osmnx-doc/examples/tests/test_osmnx.py:374:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
osmnx/pois.py:414: in pois_from_address
point = geocode(query=address)
osmnx/geo_utils.py:595: in geocode
results = response.json()
/usr/lib/python3/dist-packages/requests/models.py:897: in json
return complexjson.loads(self.text, **kwargs)
/usr/lib/python3.7/json/__init__.py:348: in loads
return _default_decoder.decode(s)
/usr/lib/python3.7/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = 
s = '\n\nAccess blocked\n\n\nAccess
blocked\n\nYou have been blocked b... the Nominatim system administrator
at\nnomina...@openstreetmap.org to have this block 
lifted.\n\n\n'
idx = 0

def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.

This can be used to decode a JSON document from a string that may
have extraneous data at the end.

"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
>   raise JSONDecodeError("Expecting value", s, err.value) from None
E   json.decoder.JSONDecodeError: Expecting value: line 1 column 1 
(char 0)

/usr/lib/python3.7/json/decoder.py:355: JSONDecodeError