Imzachjohnson / clickupython

A client for working with the ClickUp API V2
https://clickupython.readthedocs.io/
54 stars 33 forks source link

error validade type priority #59

Open bi-sumicity opened 2 years ago

bi-sumicity commented 2 years ago

pydantic\main.py", line 406, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for Task priority value is not a valid integer (type=type_error.integer)

I managed to fix it by changing the int type to Any

davenorthcreek commented 2 years ago

I just hit the same issue, thanks @bi-sumicity for the pointer

in models.py line 624 I made this change: priority: Priority = None from priority: int = None

AurahTF commented 1 year ago

having this issue currently, any fix? don't see the lines of code in models.py that I would need to change

DaWy commented 1 year ago

Following the @davenorthcreek comment i fixed the line. Could be nice to open a PR for this fix.

image

Seems that is fixed in main:

https://github.com/Imzachjohnson/clickupython/commit/ef868fc3e1e7cc5ed2a9729fd95cbeb757cda591

But latest release doesn't has this changes in it.

DaWy commented 1 year ago

For anyone having this trouble (I was also having this bug when using page parameter in the get_tasks method) if you install directly from this repo, the bug is fixed in main branch. Just do:

pip uninstall clickupython
pip install git+https://github.com/Imzachjohnson/clickupython.git

For some reason @Imzachjohnson has not made any release since almost two years.