Open
Description
Tableau Support: https://help.salesforce.com/s/case-view?caseId=500Hx00000kv6hJIAQ
Describe the bug
A clear and concise description of what the bug is.
We cannot create schedules with a MonthlyInterval, looking at the code it forces the interval to be a tuple.
Versions
Details of your environment, including:
- Tableau Server version (or note if using Tableau Online)
Tableau Server Version: 2022.3.9 (20223.23.0811.1400) 64-bit Linux
.Tableau Server Version: 2024.2.2 (20242.24.0807.0327) 64-bit Linux
- Python version
Python 3.12.6
.
- TSC library version
tableauserverclient-0.36
To Reproduce
Steps to reproduce the behavior. Please include a code snippet where possible.
tableau_auth = TSC.PersonalAccessTokenAuth(tableau_username, tableau_password)
server = TSC.Server(tableau_server, use_server_version=True)
with server.auth.sign_in(tableau_auth):
schedule = TSC.ScheduleItem(
name="my_test_schedule",
priority=50,
schedule_type=TSC.ScheduleItem.Type.Extract,
execution_order=TSC.ScheduleItem.ExecutionOrder.Parallel,
interval_item=TSC.MonthlyInterval(time(5, 30), 5),
)
new_schedule = server.schedules.create(schedule)
Results
What are the results or error messages received?
Traceback (most recent call last):
File "/MY_REPO/_develop_schedules.py", line 86, in <module>
new_schedule = server.schedules.create(schedule)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/VENV_PYTHON_PATH/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 274, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/VENV_PYTHON_PATH/site-packages/tableauserverclient/server/endpoint/schedules_endpoint.py", line 80, in create
server_response = self.post_request(url, create_req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/VENV_PYTHON_PATH/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 226, in post_request
return self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/VENV_PYTHON_PATH/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 141, in _make_request
self._check_status(server_response, url)
File "/VENV_PYTHON_PATH/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 166, in _check_status
raise ServerResponseError.from_response(server_response.content, self.parent_srv.namespace, url)
tableauserverclient.server.endpoint.exceptions.ServerResponseError:
409004: Bad Request
Schedule monthDay must be either an integer between 1 and 31 or 'LastDay'.