clickupython icon indicating copy to clipboard operation
clickupython copied to clipboard

error validade type priority

Open bi-sumicity opened this issue 3 years ago • 4 comments

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

bi-sumicity avatar May 16 '22 21:05 bi-sumicity

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

davenorthcreek avatar Jun 14 '22 22:06 davenorthcreek

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

AurahTF avatar May 09 '23 08:05 AurahTF

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 avatar Aug 01 '23 10:08 DaWy

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.

DaWy avatar Aug 01 '23 10:08 DaWy