-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscription creation without pre-existing schedule item fails (user error?) #1543
Comments
I believe this is indeed a requirement, but we could return a better error from the server, and tsc should give a hint too. |
Thank you for the support! The odd part is that I can manually create a subscription to the workbook using the front-end features, subsequently query that subscription using TSC, and observe the schedule ID, name, priority, etc. are None for that subscription. The date and time the subscription is configured to fire off is populated, but no schedule ID. That's the behavior I am trying to replicate when creating them using TSC and am at a loss as to why it doesn't work. I also tried copying the schedule item from a preexisting subscription that I manually configured. It also fails. I'll provide a snippet of the subscription object returned where the schedule ID is not populated and corresponds to the subscription mentioned above tomorrow. Thanks again! |
Manual creation of subscription to workbook. Below is the subscription retrieved after creating it manually using the front-end. The manual creation process is shown within the two images. Using subscription.dict: Accessing the schedule attribute of the subscription: Notice the schedule ID is none as are the vast majority of attributes related to the schedule aside from those necessary for the subscription. I am hoping to achieve the same functionality using TSC. I hope that makes sense! Am I just doing it wrong in my original code example or is something else amiss? @jacalata |
Describe the bug
I am attempting to create a subscription to a workbook using a schedule that doesn't exist at creation time. To perform the same action using Tableau Cloud/Server front-end, the user would configure the subscription by specifying the target type (view or entire workbook), format, subject, and schedule.
Versions
Tableau Cloud
Python 3.12.3
TSC library version 3.24
To Reproduce
Results
What are the results or error messages received?
TypeError: cannot serialize <Schedule#None "None" <DailyInterval start=00:00:00 interval=(24.0, 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')>> { _created_at: None, _end_schedule_at: None, _id: None, _next_run_at: None, _state: None, _updated_at: None, interval_item: <DailyInterval start=00:00:00 interval=(24.0, 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')>, _execution_order: None, _name: None, _priority: None, _schedule_type: None} (type ScheduleItem)
If I swap out the subscription item configuration above for the following that uses a pre-existing schedule, then it works fine.
The text was updated successfully, but these errors were encountered: