943,860 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 12698
  • Python RSS
Jan 19th, 2008
0

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

Expand Post »
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?
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
Racoon200 is offline Offline
66 posts
since Nov 2006
Jan 20th, 2008
0

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

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.
Reputation Points: 741
Solved Threads: 692
Nearly a Posting Maven
woooee is offline Offline
2,305 posts
since Dec 2006
Jan 20th, 2008
0

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

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.
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
Racoon200 is offline Offline
66 posts
since Nov 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Python & command line
Next Thread in Python Forum Timeline: Look up a dictionary both ways





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC