Posts: 12
Joined: Thu Jul 05, 2012 5:35 am
Location: Amsterdam
Contact: Website

ftplib upload hangs?

Fri Nov 20, 2015 7:18 pm

Hi All,

I've been working on a raspberrypi/python installation which can take a photo and post it to a website with a buttonpress. I'm uploading it with ftplib.

Now weird thing is; when have cabled internet all works dandy but when I have a connection via wifi the upload negotiation goes well until ftp command/response '150 - ready for upload' (a trace from setting ftplib.set_debuglevel(2) ). Now the Pi should actually send the data but on doesnt... I tried pasv true/false, no difference....

I tested the connection and normal browser traffic works, but I have no idea why the actual FTP upload does not initiate.

Another problem is that this FTP-wait freezes the program and I haven't found a way to exit this wait loop on a timeout or something.

Has anyone had this same artifacts?

Posts: 1317
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: ftplib upload hangs?

Mon Nov 23, 2015 5:07 pm

Not familiar with ftplib but something like this could help with managing the stalled process: viewtopic.php?f=32&t=126480&p=847112#p847112 - Low-level graphics and 'Coding Gold Dust'

Return to “Python”