0
使用pycharm(蟒3)写python程序,也有该程序的一部分:蟒未解决属性 - HTTPError
class GraphAPI(object):
...
def get_version(self):
'''Fetch the current version number of the Graph API being used'''
args = {"access_token":self.access_token}
try:
response = self.request(
"GET",
FACEBOOK_GRAPH_URL + self.version + "/me",
params = args,
timeout = self.timeout,
proxies = self.proxies
)
except requests.HTTPError as e:
response = json.loads(e.read())
raise GraphAPIError(response)
然而, “e.read()” 是在黄色,当上移动鼠标,它表明:
Unresolved attribute reference 'read' for class 'HTTPError',This inspection
detected names that should resolve but don't. Due to dynamic dispatch and
duck typing, this is possible in a limited but useful number of cases.Top-
level and class-level items are supported better than instance items
欢迎计算器!为了充分利用网站,提出一些好问题很重要。有关提问的指南,请访问:http://stackoverflow.com/help/how-to-ask。在这个特定的情况下,你的问题是什么? –