Skip to content

get_batch_v2() fails. #149

Description

@ForceConstant

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pyticktick.

Reproducible example

from pyticktick import Client

client = Client(v2_username="<username>", v2_password="<password>")
resp = client.get_batch_v2()

Log output

/workspace/local_mcps/ticktick_mcp/.venv/lib/python3.12/site-packages/pyticktick/settings.py:471: UserWarning: Cannot signon to v1 without `v1_client_id` and `v1_client_secret`
  warnings.warn(msg, UserWarning, stacklevel=1)
Traceback (most recent call last):
  File "/workspace/local_mcps/ticktick_mcp/main.py", line 5, in <module>
    resp = client.get_batch_v2()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/local_mcps/ticktick_mcp/.venv/lib/python3.12/site-packages/pyticktick/client.py", line 1219, in get_batch_v2
    return GetBatchV2.model_validate(resp)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/local_mcps/ticktick_mcp/.venv/lib/python3.12/site-packages/pydantic/main.py", line 705, in model_validate
    return cls.__pydantic_validator__.validate_python(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 32 validation errors for GetBatchV2
syncTaskBean.update.1.pomodoroSummaries
  Extra inputs are not permitted [type=extra_forbidden, input_value=[], input_type=list]
    For further information visit https://errors.pydantic.dev/2.11/v/extra_forbidden
syncTaskBean.update.7.pomodoroSummaries
  Extra inputs are not permitted [type=extra_forbidden, input_value=[], input_type=list]
    For further information visit https://errors.pydantic.dev/2.11/v/extra_forbidden
syncTaskBean.update.13.pomodoroSummaries
  Extra inputs are not permitted [type=extra_forbidden, input_value=[], input_type=list]
    For further information visit https://errors.pydantic.dev/2.11/v/extra_forbidden
syncTaskBean.update.20.pomodoroSummaries
  Extra inputs are not permitted [type=extra_forbidden, input_value=[], input_type=list]
    For further information visit https://errors.pydantic.dev/2.11/v/extra_forbidden
syncTaskBean.update.21.deletedTime
  Extra inputs are not permitted [type=extra_forbidden, input_value=1684778766000, input_type=int]
    For further information visit https://errors.pydantic.dev/2.11/v/extra_forbidden
syncTaskBean.update.26.pomodoroSummaries

Issue description

I am trying library for the first time, and have updated my username/password and when I run the following code I get the follwoing error. This is with "pyticktick>=0.2.0"

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions