Python Forum
501 Server cannot accept argument
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
501 Server cannot accept argument
#1
Hello
Please Help me


import sys
from ftpext.ftpext import FTPExt

source = FTPExt("100.20.75.35", **21**, "user1", "abc", False, False, 0)
target = FTPExt("200.12.62.15", **21**, "user2", "def", False, False, 0)

# upload(copy) "/test/test1.txt" to "/test"
source.fxp_to("/test/test1.txt", target, "/test", 'I')


==========
error

Traceback (most recent call last):
File “c:\Users\abc\source\repos\import2.py”, line 8, in
source.fxp_to(“/test/test1.txt”, target, “/test”, ‘I’)
File “C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\ftpext\ftpext.py”, line 244, in fxp_to


Huh target.sendport(host, host_port)



File “C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\ftplib.py”, line 296, in sendport
return self.voidcmd(cmd)
^^^^^^^^^^^^^^^^^
File “C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\ftplib.py”, line 286, in voidcmd
return self.voidresp()
^^^^^^^^^^^^^^^
File “C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\ftplib.py”, line 259, in voidresp
resp = self.getresp()
^^^^^^^^^^^^^^
File “C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\ftpext\ftpext.py”, line 123, in getresp
raise ftplib.error_perm(resp)
ftplib.error_perm: 501 Server cannot accept argument.
Larz60+ write Apr-11-2024, 09:08 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to accept facebook cookies using python selenium? pablo86ad 0 272 Apr-06-2024, 09:19 PM
Last Post: pablo86ad
  accept command line argument mg24 5 1,391 Sep-27-2022, 05:58 PM
Last Post: snippsat
  How to take the tar backup files form remote server to local server sivareddy 0 1,952 Jul-14-2021, 01:32 PM
Last Post: sivareddy
  I need my compiled Python Mac app to accept a file as a parameter Oethen 2 2,475 May-10-2020, 05:57 PM
Last Post: Oethen
  SyntaxError: positional argument follows keyword argument syd_jat 3 5,905 Mar-03-2020, 08:34 AM
Last Post: buran
  What is the correct type hint when you want to accept Iterable but not Dictionary LadySvetlana 4 3,415 Mar-05-2019, 07:33 PM
Last Post: LadySvetlana
  Pyodbc does not accept variable from tkinter diegoctn 9 4,870 Feb-12-2019, 05:12 PM
Last Post: Larz60+
  Accept Multiple Lines of Input into a User Created File Bragger 0 2,662 Oct-29-2017, 04:15 PM
Last Post: Bragger
  How do I accept input from the terminal when I execute my file? cocoa1231 1 4,182 Dec-08-2016, 11:22 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020