Skip to content

TSC.SubscriptionItem, Payload is either malformed or incomplete. (0x5CE10192 : Specifying subscription attachments not allowed.) #1430

Closed
@gdrau

Description

@gdrau

Hello, I'm trying to create a subscription for a user on a view. I put this piece of code,
schedule_id = '60c392fc-d902-44b0-92cf-cfa3b512630f'
user_id = df[0].values[i]
# Create the new SubscriptionItem object with variables from above.
new_sub = TSC.SubscriptionItem('EssaiGD', schedule_id, user_id, target)

    # (Optional) Set other fields. Any of these can be added or removed.
    new_sub.attach_image = True
    new_sub.attach_pdf = True
    new_sub.message = "You have an alert!"
    new_sub.page_orientation = TSC.PDFRequestOptions.Orientation.Portrait
    new_sub.page_size_option = TSC.PDFRequestOptions.PageType.A4
    new_sub.send_if_view_empty = True

    # Create the new subscription on the site you are logged in.
    new_sub = server.subscriptions.create(new_sub)

I launch it and when I have the error it gives me 0x5CE10192 : Specifying subscription attachments not allowed.

THanks

Version :
Product version: 2024.2.0
REST API version: 3.23
Build number: 20242.24.0711.1807
Python 3.10.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedA user needs help, may be a mistake, a bug or a feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions