Discuss / Python / 廖老师,求教,照搬了您的代码,出现以下错误,请问这是哪里出了问题?是模块的问题吗?

廖老师,求教,照搬了您的代码,出现以下错误,请问这是哪里出了问题?是模块的问题吗?

Topic source

凡人小飞

#1 Created at ... [Delete] [Delete and Lock User]

C:\Python34\python.exe "E:/Python data/zzbd/poptest.py" Traceback (most recent call last): File "E:/Python data/zzbd/poptest.py", line 2, in <module> import poplib File "C:\Python34\lib\poplib.py", line 17, in <module> import re File "E:\Python data\zzbd\re.py", line 247 raise TypeError, "first argument must be string or compiled pattern" ^ SyntaxError: invalid syntax

凡人小飞

#2 Created at ... [Delete] [Delete and Lock User]

C:\Python34\python.exe "D:\PyCharm 4.5.1\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 53162 --file "E:/Python data/zzbd/poptest.py" pydev debugger: process 9892 is connecting

Connected to pydev debugger (build 141.1245) +OK QQMail POP3 Server v1.0 Service Ready(QQMail v2.0) cmd 'USER airongfei@qq.com' cmd 'PASS Chooling' Traceback (most recent call last): File "D:\PyCharm 4.5.1\helpers\pydev\pydevd.py", line 2357, in <module> globals = debugger.run(setup['file'], None, None, ismodule) File "D:\PyCharm 4.5.1\helpers\pydev\pydevd.py", line 1777, in run pydev_imports.execfile(file, globals, locals) # execute the script File "D:\PyCharm 4.5.1\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "E:/Python data/zzbd/poptest.py", line 18, in <module> server.pass(password) File "C:\Python34\lib\poplib.py", line 212, in pass_ return self._shortcmd('PASS %s' % pswd) File "C:\Python34\lib\poplib.py", line 175, in _shortcmd return self._getresp() File "C:\Python34\lib\poplib.py", line 151, in _getresp raise error_proto(resp) poplib.error_proto: b'-ERR \xb5\xc7\xc2\xbc\xca\xa7\xb0\xdc\xa3\xac\xc7\xeb\xca\xb9\xd3\xc3\xb0\xb2\xc8\xab\xc1\xac\xbd\xd3\xa3\xa8\xc8\xe7ssl\xa3\xa9\xa3\xac\xcf\xea\xcf\xb8\xcb\xb5\xc3\xf7\xc7\xeb\xb2\xe9\xbf\xb4: http://service.mail.qq.com/cgi-bin/help?id=28'

廖雪峰

#3 Created at ... [Delete] [Delete and Lock User]

注意系统自带re模块,你自己写的py千万不要与自带模块重名


  • 1

Reply