add
ftp.set_debuglevel(3)
so you can see what the goes on the wire (without that information, it's hard
to tell if it's a bug in the library or a glitch in your server).
/F
Hello Fredrik ,
thank you for your reply. I did a ftp.set_debuglevel(3) and ftp.nlst()
now prints:
Nico Grubert wrote:
*cmd* 'NLST'
*put* 'NLST\r\n'
*get* '150 About to open data connection.\r\n'
*resp* '150 About to open data connection.'
*retr* ''
*get* '226 Transfer complete.\r\n'
*resp* '226 Transfer complete.'
[]
it's not obvious how Python could translate '' to anything other
it's not obvious how Python could translate '' to anything other
than an empty list, so it sure looks like a server issue.
(or is a problem with running in passive mode? can you test with-
out using passive mode on the same server?)
I thought using ftp.set_pasv(0) sets active mode so I
Hi there,
I am using the ftplib library to connect to a ftp server.
After I got connected, I can see a list of file in the current directory
using ftp.dir() or ftp.retrlines('LIST'). But using ftp.nlst() returns
an empty list which seems somehow strange to me. Here is, what I did:
from
Nico Grubert wrote:
I am using the ftplib library to connect to a ftp server.
After I got connected, I can see a list of file in the current directory
using ftp.dir() or ftp.retrlines('LIST'). But using ftp.nlst() returns
an empty list which seems somehow strange to me. Here is, what I did: