Skip to content

'MailChimpError' object is not subscriptable #219

@miguoliang

Description

@miguoliang
    try:
        members = client.lists.members.create('xxxxxx', {
            'email_address': 'example@123.com,
            'status': 'subscribed'
        })
    except MailChimpError as e:
        print(e['status'])
    return {
        'status': 200
    }

I run the above code, it should raise a MailChimpError exception, but when I try to read the property status, I got a new exception that 'MailChimpError' object is not subscriptable.

How can I fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions