Error: 'NoneType' object has no attribute 'sendall'

Reply

Join Date: Nov 2006
Posts: 66
Reputation: Racoon200 is an unknown quantity at this point 
Solved Threads: 1
Racoon200's Avatar
Racoon200 Racoon200 is offline Offline
Junior Poster in Training

Error: 'NoneType' object has no attribute 'sendall'

 
0
  #1
Jan 19th, 2008
I get this error when uploading a file with the ftplib via storbinary method after retrieving a file via retr method.

Why does it happen and how can I fix it?
_______
woli
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 1,197
Reputation: woooee is a jewel in the rough woooee is a jewel in the rough woooee is a jewel in the rough woooee is a jewel in the rough 
Solved Threads: 341
woooee woooee is offline Offline
Nearly a Posting Virtuoso

Re: Error: 'NoneType' object has no attribute 'sendall'

 
0
  #2
Jan 20th, 2008
NoneType usually means you are trying to use a variable that has not been defined. Without code and the error message it is impossible to tell anything at all.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 66
Reputation: Racoon200 is an unknown quantity at this point 
Solved Threads: 1
Racoon200's Avatar
Racoon200 Racoon200 is offline Offline
Junior Poster in Training

Re: Error: 'NoneType' object has no attribute 'sendall'

 
0
  #3
Jan 20th, 2008
Well, I already solved it. It was because I called a ftp close(), so when I tried to connect again, it couldn't be done (it says in the wiki of ftplib). So, I eliminated all ftp.close() and added one with the atexit function. Now it works perfectly.
_______
woli
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum


Views: 4722 | Replies: 2
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC