Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x pygeolib.GeocoderError:错误请求被拒绝_Python 3.x - Fatal编程技术网

Python 3.x pygeolib.GeocoderError:错误请求被拒绝

Python 3.x pygeolib.GeocoderError:错误请求被拒绝,python-3.x,Python 3.x,我运行以下代码,希望城市和国家名称使用纬度和经度 这是代码 这里是错误 Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> result = Geocoder.reverse_geocode(22.8176662,70.8345928) File "C:\Users\Shyam\AppData\Local\Programs\Python\Python37\li

我运行以下代码,希望城市和国家名称使用纬度和经度 这是代码

这里是错误

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    result = Geocoder.reverse_geocode(22.8176662,70.8345928)
  File "C:\Users\Shyam\AppData\Local\Programs\Python\Python37\lib\site-packages\pygeocoder.py", line 165, in reverse_geocode
    return GeocoderResult(Geocoder.get_data(params=params))
  File "C:\Users\Shyam\AppData\Local\Programs\Python\Python37\lib\site-packages\pygeocoder.py", line 212, in get_data
    raise GeocoderError(response_json['status'], response.url)
pygeolib.GeocoderError: Error REQUEST_DENIED
Query: https://maps.google.com/maps/api/geocode/json?latlng=22.817666%2C70.834593&sensor=false&bounds=&region=&language=
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
结果=地理编码器。反向地理代码(22.8176662,70.8345928)
文件“C:\Users\Shyam\AppData\Local\Programs\Python37\lib\site packages\pygeocoder.py”,第165行,与地理代码相反
返回GeocoderResult(Geocoder.get_数据(params=params))
文件“C:\Users\Shyam\AppData\Local\Programs\Python37\lib\site packages\pygeocoder.py”,第212行,在get\U数据中
引发地理编码器错误(response_json['status'],response.url)
pygeolib.GeocoderError:错误请求被拒绝
查询:https://maps.google.com/maps/api/geocode/json?latlng=22.817666%2C70.834593&sensor=false&bounds=®ion=&language=
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    result = Geocoder.reverse_geocode(22.8176662,70.8345928)
  File "C:\Users\Shyam\AppData\Local\Programs\Python\Python37\lib\site-packages\pygeocoder.py", line 165, in reverse_geocode
    return GeocoderResult(Geocoder.get_data(params=params))
  File "C:\Users\Shyam\AppData\Local\Programs\Python\Python37\lib\site-packages\pygeocoder.py", line 212, in get_data
    raise GeocoderError(response_json['status'], response.url)
pygeolib.GeocoderError: Error REQUEST_DENIED
Query: https://maps.google.com/maps/api/geocode/json?latlng=22.817666%2C70.834593&sensor=false&bounds=&region=&language=