akamai / cli-cps

Provides a way to interact with the Akamai Certificate Provisioning System (CPS) via Open APIs. Provides various functionality such as viewing certificate details, generating audits, checking change statuses, and creating/modifying certificates.
Apache License 2.0
14 stars 16 forks source link

Syntax error running help #16

Closed ehues closed 2 years ago

ehues commented 6 years ago

Installation succeeds, but akamai help cps throws a parse error:

$ akamai help cps
Traceback (most recent call last):
  File "/Users/ehughes/.akamai-cli/src/cli-cps/bin/akamai-cps", line 20, in <module>
    from cps import cli
  File "/Users/ehughes/.akamai-cli/src/cli-cps/bin/cps.py", line 267
    **arg,
         ^
SyntaxError: invalid syntax

I have python 3 installed. The install said it succeeded:

$ akamai install cps
Attempting to fetch command from https://github.com/akamai/cli-cps.git...... [OK]
Installing...... [OK]

Installed Commands:

  auth
    Interface for Akamai Edgegrid Authentication
  config
    Manage configuration
  cps (alias: certs)
    Access Certificate Provisioning System (CPS) Information
  help
    Displays help information
  install (alias: get)
    Fetch and install packages from a Git repository.
  list
    Displays available commands
  property
    Manage configurations for Akamai properties
  search
    Search for packages in the official Akamai CLI package repository
  uninstall
    Uninstall package containing <command>
  update
    Update one or more commands. If no command is specified, all commands are updated

See "akamai help [command]" for details.
aetsai commented 6 years ago

Do you by chance have python2 installed? This module requires python3+. If you have both, our akamai cli might not be picking up the right version.

Could you let us know what paths to your python2 and/or python3 install? Akamai cli tries to pick this up automatically, but perhaps there is a condition where this is not happening correctly.

This was similar to https://github.com/akamai/cli-cps/issues/9 it seems?

ehues commented 6 years ago

I have both python 2 and 3 installed.

IIRC I've installed python with brew. The paths are: /usr/bin/python /usr/bin/python2.6 /usr/bin/python2.7

/usr/local/bin/python3 /usr/local/bin/python3.6

/opt/local/bin/python /opt/local/bin/python2.7 /opt/local/bin/python3 /opt/local/bin/python3.4

fwiw, there's no python2 on my path.