homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.mahan
Recipients ajaksu2, chris.mahan, giampaolo.rodola, vstinner
Date 2009年01月03日.00:56:07
SpamBayes Score 4.8800956e-08
Marked as misclassified No
Message-id <1230944169.64.0.808282817298.issue4791@psf.upfronthosting.co.za>
In-reply-to
Content
Per Giampaolo's suggestion, I added the timeout. Program listing and
output below:
-----begin listing----
import ftplib
ftp = ftplib.FTP('ftp.edgecastcdn.net', user='theusername',
passwd='thepassword', timeout=2)
ftp.set_debuglevel(3)
ftp.cwd('chrismahan-675')
ftp.dir()
#ftp.retrlines('LIST')
ftp.close()
----end listing----
*cmd* 'CWD chrismahan-675'
*put* 'CWD chrismahan-675\r\n'
*get* '250 CWD command successful\n'
*resp* '250 CWD command successful'
*cmd* 'TYPE A'
*put* 'TYPE A\r\n'
*get* '200 Type set to A\n'
*resp* '200 Type set to A'
*cmd* 'PASV'
*put* 'PASV\r\n'
*get* '227 Entering Passive Mode (72,21,82,190,172,22).\n'
*resp* '227 Entering Passive Mode (72,21,82,190,172,22).'
*cmd* 'LIST'
*put* 'LIST\r\n'
*get* '150 Opening ASCII mode data connection for file list\n'
*resp* '150 Opening ASCII mode data connection for file list'
*retr* '-rwxrwxrwx 1 nobody nogroup 3905538 Dec 29 09:51 Bronski
Beat - Why.mp3\n'
-rwxrwxrwx 1 nobody nogroup 3905538 Dec 29 09:51 Bronski Beat -
Why.mp3
*retr* '-rwxrwxrwx 1 nobody nogroup 873966 Dec 28 13:53 test9.avi\n'
-rwxrwxrwx 1 nobody nogroup 873966 Dec 28 13:53 test9.avi
*retr* '-rwxrwxrwx 1 nobody nogroup 2512653 Dec 29 08:28
test9_lg.wmv\n'
-rwxrwxrwx 1 nobody nogroup 2512653 Dec 29 08:28 test9_lg.wmv
*retr* '-rwxrwxrwx 1 nobody nogroup 6549 Dec 29 08:28
test9_lg.wmv.jpg\n'
-rwxrwxrwx 1 nobody nogroup 6549 Dec 29 08:28 test9_lg.wmv.jpg
*retr* '-rwxrwxrwx 1 nobody nogroup 1788466 Dec 29 03:04
test9_med.flv\n'
-rwxrwxrwx 1 nobody nogroup 1788466 Dec 29 03:04 test9_med.flv
*retr* '-rwxrwxrwx 1 nobody nogroup 6394 Dec 29 03:04
test9_med.flv.jpg\n'
-rwxrwxrwx 1 nobody nogroup 6394 Dec 29 03:04 test9_med.flv.jpg
*retr* '-rwxrwxrwx 1 nobody nogroup 1263041 Dec 28 13:53
test9_sm.flv\n'
-rwxrwxrwx 1 nobody nogroup 1263041 Dec 28 13:53 test9_sm.flv
*retr* '-rwxrwxrwx 1 nobody nogroup 6465 Dec 28 13:53
test9_sm.flv.jpg\n'
-rwxrwxrwx 1 nobody nogroup 6465 Dec 28 13:53 test9_sm.flv.jpg
*retr* ''
Traceback (most recent call last):
 File "C:\python_scripts\python3\candee_processor.py", line 6, in <module>
 ftp.dir()
 File "c:\python30\lib\ftplib.py", line 511, in dir
 self.retrlines(cmd, func)
 File "c:\python30\lib\ftplib.py", line 433, in retrlines
 return self.voidresp()
 File "c:\python30\lib\ftplib.py", line 225, in voidresp
 resp = self.getresp()
 File "c:\python30\lib\ftplib.py", line 211, in getresp
 resp = self.getmultiline()
 File "c:\python30\lib\ftplib.py", line 197, in getmultiline
 line = self.getline()
 File "c:\python30\lib\ftplib.py", line 184, in getline
 line = self.file.readline()
 File "C:\Python30\lib\io.py", line 1813, in readline
 while self._read_chunk():
 File "C:\Python30\lib\io.py", line 1560, in _read_chunk
 input_chunk = self.buffer.read1(self._CHUNK_SIZE)
 File "C:\Python30\lib\io.py", line 994, in read1
 self._peek_unlocked(1)
 File "C:\Python30\lib\io.py", line 981, in _peek_unlocked
 current = self.raw.read(to_read)
 File "C:\Python30\lib\io.py", line 575, in read
 n = self.readinto(b)
 File "C:\Python30\lib\socket.py", line 214, in readinto
 return self._sock.recv_into(b)
socket.timeout: timed out
History
Date User Action Args
2009年01月03日 00:56:09chris.mahansetrecipients: + chris.mahan, vstinner, giampaolo.rodola, ajaksu2
2009年01月03日 00:56:09chris.mahansetmessageid: <1230944169.64.0.808282817298.issue4791@psf.upfronthosting.co.za>
2009年01月03日 00:56:08chris.mahanlinkissue4791 messages
2009年01月03日 00:56:07chris.mahancreate

AltStyle によって変換されたページ (->オリジナル) /