Skip to content

Troubleshooting

Tianhao He edited this page Nov 21, 2018 · 4 revisions

Installation raises error "Could not find a version that satisfies the requirement..."

  • Symptoms
    pip install cmd failed with error:
    "No matching distribution found for vapi-client-bindings==1.x.0 (from -r requirements.txt..."

  • Cause
    File path was incorrect.

  • Resolution
    Pass absolute file URI scheme to the sdk lib folder. for e.g:
    For Mac:
    pip install --upgrade --force-reinstall -r requirements.txt --extra-index-url file:///Users/strefethen/github/vsphere-automation-sdk-python/lib
    For Windows:
    pip install --upgrade --force-reinstall -r requirements.txt --extra-index-url file:\\\C:\Users\strefethen\github\vsphere-automation-sdk-python\lib

API invocation failed with error "com.vmware.vapi.std.errors_client.OperationNotFound..."

Certificate verification failed when making API calls

  • Symptoms
    Making API calls raise following exception:
    ... RecursionError: maximum recursion depth exceeded while calling a Python object
    ...
    OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]
    ...
    ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)

  • Cause
    vCenter server doesn't have a valid certificate configured.

  • Resolution
    You can skip the certificate verification on the client side.
    If you run python sdk samples, you can pass "--skipverification" cmd parameter.
    If you making API calls in python cli, you can disable cert verification on the session object:
    session = requests.session()
    session.verify = False

Unable to authenticate to API endpoint with correct credentials

  • Symptoms
    Login using correct username/password failed with exception:
    com.vmware.vapi.std.errors_client.Unauthenticated: {messages : [LocalizableMessage( id='com.vmware.vapi.endpoint.method.authentication.required', default_message='Authentication required.', args=[])], data : None

  • Cause
    Used double quote for cmd parameters and didn't escape special chars in bash CLI. See Bash manual

  • Resolution
    Use single quote for cmd parameter values. Or escape special chars such as "$" when using double quote.

Clone this wiki locally