1
所以我使用的是PyDrill做一個SQL查詢:錯誤在Python請求:ValueError異常
這是相關代碼:
yelp_reviews = drill.query('''
SELECT sum(case when t.attributes.Parking.garage='true' then 1 else 0 end) as garage,
sum(case when t.attributes.Parking.street='true' then 1 else 0 end) as street,
sum(case when t.attributes.Parking.validated='true' then 1 else 0 end) as validated,
sum(case when t.attributes.Parking.valet='true' then 1 else 0 end) as valet,
sum(case when t.attributes.Parking.lot='true' then 1 else 0 end) as lot FROM `mongo.274_BI`.`yelp_dataset`t
where t.city=?
''','Las Vegas')
在執行這一點,我得到以下錯誤:
ValueError: Timeout value connect was Las Vegas, but it must be an int or float.
我更新使用
pip install -U requests;
請求
雖然錯誤仍然存在。請幫忙。