python ftplib上传文件出现ftplib.error_perm 550 The parameter is incorrect错误的原因和解决
2018-01-02 19:33
896 查看
首先确认服务器没有问题
其他文件能够上传通过网页访问服务器能够正常访问
错误示例
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "app.py", line 104, in ftp_upload ret = ftp.storlines('STOR %s' % (os.path.basename(file)), file_handler) File "/usr/lib/python2.7/ftplib.py", line 493, in storlines conn = self.transfercmd(cmd) File "/usr/lib/python2.7/ftplib.py", line 376, in transfercmd return self.ntransfercmd(cmd, rest)[0] File "/usr/lib/python2.7/ftplib.py", line 339, in ntransfercmd resp = self.sendcmd(cmd) File "/usr/lib/python2.7/ftplib.py", line 249, in sendcmd return self.getresp() File "/usr/lib/python2.7/ftplib.py", line 224, in getresp raise error_perm, resp ftplib.error_perm: 550 The parameter is incorrect
错误原因
可能是文件名称不规范。如果文件名称带有冒号,则可能出现错误。
当要上传的目标文件文件名称带有冒号时,会导致识别失败。
解决
将文件名称中的冒号等特殊字符去掉即可。相关文章推荐
- vc 出现“fatal error C1085: Cannot write precompiled header file: 'Debug/xxx.pch': The parameter is incorrect“的错误的解决办法
- 如何解决FTP上传文件时出现的"Access is denied"错误?
- 使用Vs2005打开clearcase版本控制中的文件出现问题“The Parameter is incorrect...”
- window10 安装出现the error code is 2503错误的解决方法
- 打开sln文件出现the selected file is not a valid visual studio solution file错误提示解决办法
- swift编码出现Call can throw, but it is not marked with 'try' and the error is not handled错误的解决
- 将App通过XCode上传到AppStore出现这个错误“An error occurred uploading to the iTunes Store”的解决方法
- Python 出现错误TypeError: ‘NoneType’ object is not iterable解决办法
- python 向linux vsftpd服务器传文件报错:ftplib.error_perm: 550 Permission denied
- windows python flask上传文件出现IOError: [Errno 13] Permission denied: 'E:\\git\\test\\static\\uploads'的解决方法
- 将App通过XCode上传到AppStore 出现这个错误“An error occurred uploading to the iTunes Store”的解决方法
- 打开sln文件出现 “the selected file is not a valid visual studio solution file”错误提示解决办法
- 郁闷N天了,IDFTP发生10054错误后无法继续上传文件,重新创建IDFTP后发生错误:550 cannot create file。请教解决方法
- 安装MySQL5.5程序出现the error code is 2503/2502错误解决方法
- FileUpload上传多文件时出现“无法访问已关闭的文件”错误的解决方法
- 上传文件出现Mach_msg_trap错误之解决
- json-lib出现There is a cycle in the hierarchy解决办法
- FileUpload上传多文件时出现“无法访问已关闭的文件”错误的解决方法
- json-lib出现There is a cycle in the hierarchy解决办法
- 解决文件无法上传的问题,错误信息:System.IO.DirectoryNotFoundException: Could not find a part of the path.