python - I am trying to call information on venues in a 500 m radius of a location via the foursquare API. I keep getting getting the error: [WinError 10061]
问题描述
This is my code so far:
LIMIT = 50 # limit of number of venues returned by Foursquare API
radius = 500 # define radius
# create URL
url = 'https://api.foursquare.com/v2/venues/explore?&client_id={}&client_secret={}&v={}&ll={},{}&radius={}&limit={}'.format(
CLIENT_ID,
CLIENT_SECRET,
VERSION,
neighborhood_latitude,
neighborhood_longitude,
radius,
LIMIT)
url
results = requests.get(url).json()
results
ERROR:
NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000175790F8308>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
解决方案
推荐阅读
- apache-spark - 如何在 Spark Structured Streaming 中控制输出文件的大小
- reactjs - 如何编辑儿童表格分页素材ui组件的css
- c# - C#获取特定文本格式的偏移量和长度,然后用另一个文本替换它
- android - gms 中的冲突:不同版本的 play-service 和 firebase-ml-vision 库实现
- python - 如何删除从 .csv 文件读取的数据中的引号?
- java - 为什么 Intellij 项目类路径损坏?
- spring-boot - @Configuration 类应该放在哪里?
- android - 关于 setFollowRedirects() 的困惑
- python - 为什么我的 Flask 应用程序会重定向一条路由,即使我没有配置它?
- angular - 如何在没有表单功能的情况下防止 Angular 中的无效数据