0
我使用Python imaplib.IMAP4
連接到Google電子郵件。除了使用包含空格字符的郵箱名稱的IMAP4.select()
方法時,每件事都可以。假設我的郵箱名稱是「Gama Sutra」。Python IMAP4選擇郵箱名稱包含空格字符,錯誤
當我執行imap.select('[Gmail]/Gama Sutra')
它給了我這個錯誤:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imaplib.py", line 682, in select
typ, dat = self._simple_command(name, mailbox)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imaplib.py", line 1133, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imaplib.py", line 964, in _command_complete
raise self.error('%s command error: %s %s' % (name, typ, data))
imaplib.error: SELECT command error: BAD [b'Could not parse command']
如何解決?
你好最大,它的工作現在。 – rorosy
非常感謝.. – rorosy
然後請upvote並接受答案。 – Max