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。在這個特定的情況下,你的問題是什麼? –