ftputil upload error

C

Croteam

Hello,

I have one problem about ftputil file upload.Here is my short example:

from ftputil import FTPHost
import tkFileDialog
import os
from Tkinter import Tk

ftp=FTPHost('myserver','username','password')

forupload=tkFileDialog.askopenfile(parent=root)

file=forupload.name




## I was choose file C:/Documents and Settings/VEKI/My
Documents/internet/popravak.txt ##



ftp.upload(file,os.path.basename(file))

THEN I GAIN ERROR:
Traceback (most recent call last):
File "<pyshell#48>", line 1, in -toplevel-
ftp.upload(file,os.path.basename(file),'b')
File "C:\Python24\lib\ftputil.py", line 417, in upload
self.__copy_file(source, target, mode, open, self.file)
File "C:\Python24\lib\ftputil.py", line 406, in __copy_file
target = target_open(target, target_mode)
File "C:\Python24\lib\ftputil.py", line 245, in file
host._file._open(effective_file, mode)
File "C:\Python24\lib\ftp_file.py", line 115, in _open
self._conn = ftp_error._try_with_ioerror(
File "C:\Python24\lib\ftp_error.py", line 101, in _try_with_ioerror
raise FTPIOError(ftp_error)
FTPIOError: 550 popravak.txt: Access is denied.
Debugging info: ftputil 2.1, Python 2.4.2 (win32)



Regards,

Vedran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top