UBER Python API返回uber_rides.errors.ClientError

时间:2016-09-20 12:11:16

标签: python uber-api

我写了一段代码来获取产品信息。我使用了github中提供的代码。

from uber_rides.session import Session
session = Session(server_token="key_given_here")

from uber_rides.client import UberRidesClient
client = UberRidesClient(session)
response = client.get_products(12.9242845,77.582953)
products = response.json.get('products')
print products

它返回以下错误:

uber_rides.errors.ClientError: The request contains bad syntax or cannot be filled due to a fault from the client sending the request.

为什么会这样。我的代码出了什么问题?

1 个答案:

答案 0 :(得分:0)

我得到了答案。代码工作得很完美。我提供的server_token中缺少一个字符。