当前位置:   article > 正文

服务器响应551,为什么输出fi上的ftp响应551错误

error on output file

当使用python的ftplib传输文件时,服务器返回551个错误代码模块。但是可以通过手动输入linux命令成功传输。在

在Linux服务器上运行python2.7代码。在def upload(self, file_local_path, file_remote):

bufsize = 1024

fp = open(file_local_path, 'rb')

self.ftp.storbinary('STOR ' + file_remote, fp, bufsize)

return

2019-04-18 15:01:02,215 - upload/upload.py[line:57] - ERROR: Traceback (most recent call last):

File "upload/upload.py", line 50, in performing_tasks

ftp.upload(os.path.join(get_config.bill_file_out_path, file), get_config.ftp_upload_remote + file)

File "/data/bboss/bossscript/upload/ftp_file.py", line 51, in upload

self.ftp.storbinary('STOR /imcoming/SIM_CDR/SIM_20190418.1352',fp,bufsize)

File "/data/python27/lib/python2.7/ftplib.py", line 478, in storbinary

return self.voidresp()

File "/data/python27/lib/python2.7/ftplib.py", line 229, in voidresp

resp = self.getresp()

File "/data/python27/lib/python2.7/ftplib.py", line 224, in getresp

raise error_perm, resp

error_perm: 551 /imcoming/SIM_CDR/SIM_20190418.1352: Error on output file.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/255372
推荐阅读
相关标签
  

闽ICP备14008679号