Skip to content

Python code gives error HTTPProxyConnection.call() missing 2 required positional arguments: 'port' and 'timeout' #1090

@prashant1diwase

Description

@prashant1diwase

Describe the bug

When we tried to connect with the below details, it started giving the below error with pyvmomi 8.0.3.0.1

Error

HTTPProxyConnection.call() missing 2 required positional arguments: 'port' and 'timeout'

Reproduction steps

When we tried to connect with the below details, it started giving the below error with pyvmomi 8.0.3.0.1

Code

    server = "146.89.140.53"
    httpsProxy ='http://146.72.882.22:3128'
    proxy = urlparse(httpsProxy)

    smart_stub = SmartStubAdapter(
        host=server,
        httpProxyHost=proxy.hostname,
        httpProxyPort=proxy.port,
        disableSslCertValidation=True,
    )

Expected behavior

It should be able to connect

Additional context

Analysis

However, when we checked further there was a change in implementation for pyvmomi 8.0.3.0.1 compared with pyvmomi 8.0.2.0.1.
When we applied the fix given in #1085, by changing committed files [connect.py, Security.py, SoapAdapter.py] (9a8956f) it gave different error -

Error

[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1006)')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions