Error on FTP Upload .. No such file or directory

2007-05-17 Thread Tarun Kapoor

---
Code
--

remotepath = /incoming

f = FTP(host)
f.login(username,password)
f.cwd(remotepath)
localfile =C:\\test.txt
fd = open(localfile,'rb')
path,filename = os.path.split(localfile)
f.storbinary('STOR %s' % filename,fd)
fd.close()
f.quit()



Error

Traceback (most recent call last):
  File P:\Working\Python code\temp.py, line 21, in ?
uploadFile(C:\\test.txt)
  File P:\Working\Python code\temp.py, line 16, in uploadFile
f.storbinary('STOR %s' % filename,fd)
  File C:\Python23\lib\ftplib.py, line 415, in storbinary
conn = self.transfercmd(cmd)
  File C:\Python23\lib\ftplib.py, line 345, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
  File C:\Python23\lib\ftplib.py, line 327, in ntransfercmd
resp = self.sendcmd(cmd)
  File C:\Python23\lib\ftplib.py, line 241, in sendcmd
return self.getresp()
  File C:\Python23\lib\ftplib.py, line 214, in getresp
raise error_perm, resp
ftplib.error_perm: 553 test.txt: No such file or directory.

Disclaimer

This e-mail and any attachments is confidential and intended solely for the use 
of the individual(s) to whom it is addressed. Any views or opinions presented 
are solely those of the author and do not necessarily represent those of 
Waterstone Capital Management, L.P and affiliates. If you are not the intended 
recipient, be advised that you have received this e-mail in error and that any 
use, dissemination, printing, forwarding or copying of this email is strictly 
prohibited. Please contact the sender if you have received this e-mail in 
error. You should also be aware that e-mails are susceptible to interference 
and you should not assume that the contents of this e-mail originated from the 
sender above or that they have been accurately reproduced in their original 
form. Waterstone Capital Management, L.P. and affiliates accepts no 
responsibility for information, or errors or omissions in this e-mail or use or 
misuse thereof. If in doubt, please verify the authenticity with the!
  sender.


-- 
http://mail.python.org/mailman/listinfo/python-list


Error on FTP Upload .. No such file or directory

2007-05-17 Thread Tarun Kapoor
By the way...

test.txt does exist

Disclaimer

This e-mail and any attachments is confidential and intended solely for the use 
of the individual(s) to whom it is addressed. Any views or opinions presented 
are solely those of the author and do not necessarily represent those of 
Waterstone Capital Management, L.P and affiliates. If you are not the intended 
recipient, be advised that you have received this e-mail in error and that any 
use, dissemination, printing, forwarding or copying of this email is strictly 
prohibited. Please contact the sender if you have received this e-mail in 
error. You should also be aware that e-mails are susceptible to interference 
and you should not assume that the contents of this e-mail originated from the 
sender above or that they have been accurately reproduced in their original 
form. Waterstone Capital Management, L.P. and affiliates accepts no 
responsibility for information, or errors or omissions in this e-mail or use or 
misuse thereof. If in doubt, please verify the authenticity with the!
  sender.


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error on FTP Upload .. No such file or directory

2007-05-17 Thread Steve Holden
Tarun Kapoor wrote:
 By the way...
 
 test.txt does exist
 
 Disclaimer
 
 This e-mail and any attachments is confidential and intended solely for the 
 use of the individual(s) to whom it is addressed. Any views or opinions 
 presented are solely those of the author and do not necessarily represent 
 those of Waterstone Capital Management, L.P and affiliates. If you are not 
 the intended recipient, be advised that you have received this e-mail in 
 error and that any use, dissemination, printing, forwarding or copying of 
 this email is strictly prohibited. Please contact the sender if you have 
 received this e-mail in error. You should also be aware that e-mails are 
 susceptible to interference and you should not assume that the contents of 
 this e-mail originated from the sender above or that they have been 
 accurately reproduced in their original form. Waterstone Capital Management, 
 L.P. and affiliates accepts no responsibility for information, or errors or 
 omissions in t
  his e-mail or use or misuse thereof. If in doubt, please verify the 
 authenticity with the!
   sender.
 
 
It looks like a permissions error from the message (I haven't dug into 
the library code, which you can do relatively easily - the Python is 
there if you want to read it, and the traceback tells you which file to 
look in).

Maybe there's a non-deletable test.txt on the server already?

regards
  Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd   http://www.holdenweb.com
Skype: holdenweb  http://del.icio.us/steve.holden
-- Asciimercial -
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.comsquidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-- Thank You for Reading 

-- 
http://mail.python.org/mailman/listinfo/python-list