Problems with ftplib connection

Hello friends!!!

I have made an app with wxpython which connects to an ftp server and downloads newer versions

of files ( images ). i have installed this app in more than 100 pc’s ( all of them on various flavours of Windows )

but on a very few , when the app starts , i get the following traceback , and the app stops because

it cannot perform the task. I repeat , this happens on very few of the pc’s.

Traceback (most recent call last):
File “C:\Python25\My_Tablet_Sales_Project\Tablet_Main_Frame.pyw”, line 607, in
frame = create(None)
File “C:\Python25\My_Tablet_Sales_Project\Tablet_Main_Frame.pyw”, line 39, in create
return Tablet_Midaki(parent)
File “C:\Python25\My_Tablet_Sales_Project\Tablet_Main_Frame.pyw”, line 178, in init
Update_Codes_Database()
File “C:\Python25\My_Tablet_Sales_Project\FTP_Module.py”, line 436, in Update_Codes_Database
ftp.retrlines(‘NLST’, Remote_Filenames.append)
File “C:\Python25\lib\ftplib.py”, line 407, in retrlines
conn = self.transfercmd(cmd)
File “C:\Python25\lib\ftplib.py”, line 356, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File “C:\Python25\lib\ftplib.py”, line 339, in ntransfercmd
sock = self.makeport()
File “C:\Python25\lib\ftplib.py”, line 292, in makeport
resp = self.sendport(host, port)
File “C:\Python25\lib\ftplib.py”, line 256, in sendport
return self.voidcmd(cmd)
File “C:\Python25\lib\ftplib.py”, line 246, in voidcmd
return self.voidresp()
File “C:\Python25\lib\ftplib.py”, line 221, in voidresp
resp = self.getresp()
File “C:\Python25\lib\ftplib.py”, line 216, in getresp
raise error_perm, resp
error_perm: 501 Server cannot accept argument.

``

Any clues how to fix or prevent it?

Thank you in advance ,

Elias Alhanatis

I’m going to guess that this has to do with firewall settings on the network those machines are on ( or the machine’s firewall settings). But in any case, it’s an ftplib problem, not a wxPython one.

But I’d refactor your app to catch the error, so the app can still start up with the failure, and then you can either proceed without the download, or at least give a nice meaningful error message.

As to thefts problem: ftp is an d and some think insecure protocol. So sysadmins lock down their systems in sometimes incompatible ways.

The first thing I’d do I’d see if the users can access that to site with a different type client. If so, then look into what its settings are, and try to emulate them.

You may get more help in a general python list as well.

Good luck,

Chris

···

Sent from my iPhone

On Aug 11, 2015, at 2:58 AM, Elias Alhanatis ealhanatis@gmail.com wrote:

Hello friends!!!

I have made an app with wxpython which connects to an ftp server and downloads newer versions

of files ( images ). i have installed this app in more than 100 pc’s ( all of them on various flavours of Windows )

but on a very few , when the app starts , i get the following traceback , and the app stops because

it cannot perform the task. I repeat , this happens on very few of the pc’s.

Traceback (most recent call last):
File “C:\Python25\My_Tablet_Sales_Project\Tablet_Main_Frame.pyw”, line 607, in
frame = create(None)
File “C:\Python25\My_Tablet_Sales_Project\Tablet_Main_Frame.pyw”, line 39, in create
return Tablet_Midaki(parent)
File “C:\Python25\My_Tablet_Sales_Project\Tablet_Main_Frame.pyw”, line 178, in init
Update_Codes_Database()
File “C:\Python25\My_Tablet_Sales_Project\FTP_Module.py”, line 436, in Update_Codes_Database
ftp.retrlines(‘NLST’, Remote_Filenames.append)
File “C:\Python25\lib\ftplib.py”, line 407, in retrlines
conn = self.transfercmd(cmd)
File “C:\Python25\lib\ftplib.py”, line 356, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File “C:\Python25\lib\ftplib.py”, line 339, in ntransfercmd
sock = self.makeport()
File “C:\Python25\lib\ftplib.py”, line 292, in makeport
resp = self.sendport(host, port)
File “C:\Python25\lib\ftplib.py”, line 256, in sendport
return self.voidcmd(cmd)
File “C:\Python25\lib\ftplib.py”, line 246, in voidcmd
return self.voidresp()
File “C:\Python25\lib\ftplib.py”, line 221, in voidresp
resp = self.getresp()
File “C:\Python25\lib\ftplib.py”, line 216, in getresp
raise error_perm, resp
error_perm: 501 Server cannot accept argument.

``

Any clues how to fix or prevent it?

Thank you in advance ,

Elias Alhanatis

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Elias Alhanatis wrote:

I have made an app with wxpython which connects to an ftp server and
downloads newer versions
of files ( images ). i have installed this app in more than 100 pc's (
all of them on various flavours of Windows )
but on a very few , when the app starts , i get the following
traceback , and the app stops because
it cannot perform the task. I repeat , this happens on very few of the
pc's.

Are you setting passive mode? It's possible that those questionable PCs
are behind a proxy that requires FTP passive mode.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.