8000 We cannot create schedules with a MonthlyInterval, looking at the code it forces the interval to be a tuple. · Issue #1579 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

We cannot create schedules with a MonthlyInterval, looking at the code it forces the interval to be a tuple. #1579

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

Open
8000
casey-crawford-cfa opened this issue Mar 6, 2025 · 1 comment

Comments

@casey-crawford-cfa
Copy link
Contributor

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'.
@chroche
Copy link
chroche commented Apr 21, 2025

Somewhat related, in the sense that the time interval handling seems a bit wobbly: #1508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0