Python Script Error

337
0
04-27-2019 10:49 PM
AbdullahTuwaiya
New Contributor

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: module1.py [-h]
sourcePortal sourceAdmin sourcePassword query destPortal
destAdmin destPassword owner folder
module1.py: 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('sourcePortal',
help=('https://??????'))
parser.add_argument('sourceAdmin', help='?????')
parser.add_argument('sourcePassword', help='????')
parser.add_argument('query', help='??????')
parser.add_argument('destPortal',
help=('https:?????'))
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 

0 Kudos
0 Replies