錯誤:如何使用python imaplib.IMAP4.search()搜索特定的電子郵件
Traceback (most recent call last):
File "mail.py", line 37, in <module>
typ, data = M.search(None, 'UNSEEN SINCE T')
File "/usr/lib/python2.7/imaplib.py", line 627, in search
typ, dat = self._simple_command(name, *criteria)
File "/usr/lib/python2.7/imaplib.py", line 1070, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "/usr/lib/python2.7/imaplib.py", line 905, in _command_complete
raise self.error('%s command error: %s %s' % (name, typ, data))
imaplib.error: SEARCH command error: BAD ['Parse command error']
我要搜索電子郵件,因爲一個特定的時間。這是我的代碼,但它運行錯誤。可以給我一些關於如何解決它的建議。感謝很多!
郵政錯誤工作對我來說 specyfing標籤。 –
不要以這種方式捕捉你的異常,讓他們冒泡,讓你可以調試出了什麼問題。 – Owen