【发布时间】:2015-01-17 10:18:13
【问题描述】:
我已经在 Windows Server 2012 上安装了 Visual Studio 2013 Community 和 Python Tools for Visual Studio 2.1 with Python 3.4.2。智能感知似乎无法正常工作
import gspread
import requests
import json
# correctly calls gc a 'client' type
gc = gspread.login('<user_name redacted>','<password redacted>')
# correctly calls wks a 'Worksheet' type
wks = gc.open('testing_sheet').sheet1
# INCORRECTLY calls the json_test object a 'boolean, NoneType, float, int, object' type
json_test = json.loads('{"chicken":"cluck"}')
# correctly calls post_data a 'dict' type
post_data = {'item':'abc'}
# correctly calls post_headers a 'dict' type
post_headers = {'content-encoding': 'json'}
# INCORRECTLY calls post_requests a 'bool' type, should be type 'Response'
post_requests = requests.post(url = '<redacted>', data = json.dumps(post_data), headers = post_headers)
我曾多次尝试重建数据库,卸载并重新安装 Python 和 PTVS,但它总是错误地识别这些对象。难道我做错了什么?我还能做些什么吗?
【问题讨论】:
标签: python-3.x visual-studio-2013 ptvs