<p>我是python新手,我正在尝试使用一个库。它引发了一个例外,我正试图确定是哪一个。这就是我正在尝试的:</p>
<pre><code>except tweepy.TweepError as e:
print e
print type(e)
print e.__dict__
print e.reason
print type(e.reason)
</code></pre>
<p>这就是我得到的:</p>
<pre><code>[{u'message': u'Sorry, that page does not exist', u'code': 34}]
<class 'tweepy.error.TweepError'>
{'reason': u"[{u'message': u'Sorry, that page does not exist', u'code': 34}]", 'response': <httplib.HTTPResponse instance at 0x00000000029CEAC8>}
[{u'message': u'Sorry, that page does not exist', u'code': 34}]
<type 'unicode'>
</code></pre>
<p>我试着去查那个密码。我尝试了e.reason.code,但没有成功,我不知道该尝试什么。</p>