Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
384 stars 1.25k forks source link

Bug len(None) communication extension inline attachments #8123

Open manuelmazzuola opened 1 month ago

manuelmazzuola commented 1 month ago

Describe the bug

With the new version 1.11.0 and the introduction of inline attachments for the azure communication extension, a bug raises with a len of None object error when not setting the inline attachments.

Thanks.

Related command

az communication email send

Errors

object of type 'NoneType' has no len()

Issue script & Debug output

az communication email send \
        --connection-string "${AZURE_COMMUNICATION_SERVICE_ENDPOINT}" \
        --sender "DoNotReply@${AZURE_FROM_SENDER_DOMAIN}" \
        --to "${to_email}" \
        --subject "TEST" \
        --text "See the attachment." \
        --attachments ${filename} \
        --attachment-types plain/text

Expected behavior

Should work.

Environment Summary

azure-cli 2.64 azure communication extension 1.11.0

Additional context

Using azure communication extension 1.10.0 everything work as expected..

yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.

ealmuneyeer commented 1 month ago

@manuelmazzuola , thank you for reporting this, and sorry for the inconvenience. I was able to reproduce it locally. As a workaround, I downgraded the communication extension to version 1.10.0, which allowed me to send the email successfully as you mentioned.

Here are the useful commands for everyone else: To remove the extension: az extension remove --name communication

To install communication extension v1.10.0: az extension add --name communication --version 1.10.0

ealmuneyeer commented 1 month ago

@manuelmazzuola , a new communication extension version 1.11.1 has been released and it includes the fix.

manuelmazzuola commented 4 weeks ago

Thank you