AnsweredAssumed Answered

Python Script Error

Question asked by Atuwaiya on Apr 27, 2019

I am trying to run a script from ESRI that copies items between two Portal instances. When I run the script I get this error on the python interpreter


usage: [-h]
sourcePortal sourceAdmin sourcePassword query destPortal
destAdmin destPassword owner folder error: too few arguments

I have put the correct credentials and parameters in the run script section 


 # Run the script.
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('sourceAdmin', help='?????')
parser.add_argument('sourcePassword', help='????')
parser.add_argument('query', help='??????')
parser.add_argument('destAdmin', help='??????')
parser.add_argument('destPassword', help='??????')
parser.add_argument('owner', help='???????')
parser.add_argument('folder', help='???????')


the script can be found here: Example: Copy content—Portal for ArcGIS (10.7) | ArcGIS Enterprise 


Appreciate if anyone has any idea how to solve the error message