[ftputil] Empty listdir in non empty directory

Rodrigo Santellan rsantellan at gmail.com
Thu May 4 04:09:33 CEST 2017


Hi Mattias,

When I had troubles with the connection I increased the debug level.

Can you try:
http://ftputil.sschwarzer.net/trac/wiki/Documentation#session-factories
creating a session factory with debug 2 and posting the output?

Regards

On Wed, May 3, 2017 at 5:32 PM, Mattias <mb at bokesand.se> wrote:

> Hi
> I have a problem with ftputil.
> I get empty result fromlistdir.
> If it matters my ftp-server runs on Windows CE 7.0 and the client running
> my python script runs on a raspberry pi (raspbian jessie lite)
>
>
> host = ftputil.FTPHost('192.168.10.83', 'abc', '123')
> names = host.listdir(host.curdir)
> print (names)
>
> returns just []
>
> But:
> # File: ftplib-example-1.py
> import ftplib
> ftp = ftplib.FTP("192.168.10.83")
> ftp.login("abc", "123")
> data = []
> ftp.dir(data.append)
> ftp.quit()
> for line in data:
>     print "-", line
>
> returns a long list like
> ...
> - 06-08-15  19:57                64505 Elekta20150608_13_48.csv
> - 06-11-15  19:31                87932 Elekta20150611_11_14.csv
> - 06-16-15  18:51                78498 Elekta20150616_11_37.csv
> ...
>
>
> Any ideas what could be wrong?
>
> Thanks in advance
> /Mattias Bokesand
>
> _______________________________________________
> ftputil mailing list
> ftputil at lists.sschwarzer.net
> http://lists.sschwarzer.net/listinfo/ftputil
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sschwarzer.net/pipermail/ftputil/attachments/20170503/eceddc4d/attachment.html>


More information about the ftputil mailing list