File "../tools/deploy.py", line 113 - Error while setting up the sample proxes

Hi -

I'm trying to setting up the sample proxies https://github.com/apigee/api-platform-samples#initial

via. api-pltform-samples. I'm getting below error while deployment.

File "../tools/deploy.py", line 113 print 'Environment: %s' % d['environment'] ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Environment: %s' % d['environment'])? If 'State: deployed', then your API Proxy is ready to be invoked. Change directory to the sample API proxy deployed, and run 'invoke.sh' For OAuth, you need to run setup.sh in /setup/provisioning directory to install sample API products, developers and apps in your org. Do you want to run now? ([yes]/no):

Please help

Regards,

Tejas

Solved Solved
0 1 121
1 ACCEPTED SOLUTION

To setup the sample https://github.com/apigee/api-platform-samples#initial requires Python v2+ to configure the same. I have installed Python v3+ creates problem while deploying proxies.

This error message means that you are attempting to use Python 3 to follow an example or run a program that uses the Python 2 print statement:

print"Hello, World!"

The statement above does not work in Python 3. In Python 3 you need to add parentheses around the value to be printed:

print("Hello, World!")

“SyntaxError: Missing parentheses in call to 'print'” is a new error message that was added in Python 3.4.2 primarily to help users that are trying to follow a Python 2 tutorial while running Python 3.

In Python 3, printing values changed from being a distinct statement to being an ordinary function call, so it now needs parentheses:

View solution in original post

1 REPLY 1

To setup the sample https://github.com/apigee/api-platform-samples#initial requires Python v2+ to configure the same. I have installed Python v3+ creates problem while deploying proxies.

This error message means that you are attempting to use Python 3 to follow an example or run a program that uses the Python 2 print statement:

print"Hello, World!"

The statement above does not work in Python 3. In Python 3 you need to add parentheses around the value to be printed:

print("Hello, World!")

“SyntaxError: Missing parentheses in call to 'print'” is a new error message that was added in Python 3.4.2 primarily to help users that are trying to follow a Python 2 tutorial while running Python 3.

In Python 3, printing values changed from being a distinct statement to being an ordinary function call, so it now needs parentheses: