Vonage / vonage-python-sdk

Vonage Server SDK for Python. API support for Voice, SMS, WhatsApp, Verify (2FA), Video Meetings and more.
https://developer.vonage.com
Apache License 2.0
187 stars 115 forks source link

Current 3.2.0 release does not include vonage.ncco_builder directory or files #237

Closed jroscoe5 closed 1 year ago

jroscoe5 commented 1 year ago

When installing the vonage package via pip, the ncco_builder directory is not included.

Steps to Reproduce (for bugs)

pip install vonage==3.2.0

Run some example code

import vonage

client = vonage.Client(
    application_id=VONAGE_APPLICATION_ID,
    private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)

response = client.voice.create_call({
    'to': [{'type': 'phone', 'number': TO_NUMBER}],
    'from': {'type': 'phone', 'number': VONAGE_NUMBER},
    'ncco': [{'action': 'talk', 'text': 'This is a text to speech call from Nexmo'}]
})

pprint(response)

Exception:

.env\lib\site-packages\vonage\client.py", line 7, in <module>
    from .ncco_builder.ncco import Ncco, ConnectEndpoints, InputTypes, PayPrompts
ModuleNotFoundError: No module named 'vonage.ncco_builder'

As the offending imports are not currently being used, removing line 7 fixes the issue.

Your Environment

maxkahan commented 1 year ago

Hi, thanks for raising this. I've identified the problem and will push a fix today.

maxkahan commented 1 year ago

Thanks again, found the issue was something that didn't get committed. I've pushed a fix now and released a new version, v3.2.1, which is available with pip install --upgrade vonage

Release page is here