imzachjohnson / clickupython Goto Github PK
View Code? Open in Web Editor NEWA client for working with the ClickUp API V2
Home Page: https://clickupython.readthedocs.io/
A client for working with the ClickUp API V2
Home Page: https://clickupython.readthedocs.io/
Cleanup unnecessary variable declarations, format, look for more issues.
As title says, clickup allows priority to be both str or int, changing the priority type in the Task model to be typing.Any
fixes this.
I am running the latest build and have tried using python 3.6-3.9 on linux and Windows and run into the same issue albeit I get slightly different error messages. Seems to be related to pydantic.
from clickupython.client import ClickUpClient
MY_KEY = "MY_KEY"
LIST_ID = "LIST_ID"
client = ClickUpClient(MY_KEY)
for task in client.get_tasks(LIST_ID):
print(task)
PS C:\Users\Simon\Desktop\AutoClickUp> python main.py
Traceback (most recent call last):
File "main.py", line 6, in
for task in client.get_tasks('LIST_ID'):
File "C:\Users\Simon\AppData\Local\Programs\Python\Python38\lib\site-packages\clickupython\client.py", line 631, in get_tasks
return models.Tasks.build_tasks(fetched_tasks)
File "C:\Users\Simon\AppData\Local\Programs\Python\Python38\lib\site-packages\clickupython\models.py", line 704, in build_tasks
return Tasks(**self)
File "pydantic\main.py", line 406, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 264 validation errors for Tasks
tasks -> 0 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 0 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 0 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 1 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 1 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 1 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 2 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 2 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 2 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 3 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 3 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 3 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 4 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 4 -> custom_fields -> 1 -> value
str type expected (type=type_error.str)
tasks -> 4 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 5 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 5 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 5 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 6 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 6 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 6 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 7 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 7 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 7 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 8 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 8 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 8 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 9 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 9 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 9 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 10 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 10 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 11 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 11 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 11 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 12 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 12 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 12 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 13 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 13 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 13 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 14 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 14 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 15 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 15 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 15 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 16 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 16 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 16 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 17 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 17 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 17 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 18 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 18 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 19 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 19 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 19 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 20 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 21 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 23 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 23 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 23 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 24 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 24 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 24 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 25 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 25 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 25 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 26 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 26 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 26 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 27 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 27 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 28 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 28 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 29 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 29 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 30 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 30 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 31 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 31 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 31 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 32 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 32 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 32 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 33 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 33 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 33 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 34 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 34 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 34 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 35 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 35 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 35 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 36 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 36 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 36 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 37 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 37 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 37 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 38 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 38 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 38 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 39 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 39 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 39 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 40 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 40 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 40 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 41 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 41 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 42 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 42 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 43 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 43 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 43 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 44 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 44 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 44 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 45 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 45 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 45 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 46 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 46 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 46 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 47 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 47 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 48 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 48 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 48 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 49 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 49 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 49 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 50 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 50 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 50 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 51 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 51 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 51 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 52 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 52 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 52 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 53 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 53 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 53 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 54 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 54 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 54 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 55 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 55 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 55 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 56 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 56 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 56 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 57 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 57 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 57 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 58 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 58 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 58 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 59 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 59 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 59 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 60 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 60 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 60 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 61 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 62 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 62 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 62 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 63 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 63 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 64 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 64 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 65 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 65 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 65 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 66 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 66 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 66 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 67 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 67 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 67 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 68 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 68 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 68 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 69 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 69 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 70 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 70 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 70 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 71 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 71 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 71 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 72 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 72 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 72 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 73 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 73 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 73 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 74 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 74 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 74 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 75 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 75 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 76 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 76 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 76 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 77 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 77 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 77 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 78 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 78 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 78 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 79 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 79 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 79 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 80 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 80 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 81 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 81 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 81 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 82 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 82 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 83 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 83 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 84 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 84 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 85 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 85 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 86 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 86 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 87 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 87 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 88 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 88 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 89 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 89 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 89 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 90 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 90 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 90 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 91 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 91 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 92 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 92 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 93 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 93 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 93 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 94 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 94 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 95 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 95 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 95 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 96 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 96 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 97 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 97 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 97 -> custom_fields -> 2 -> value
tasks -> 98 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 98 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 99 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 99 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 99 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
PS C:\Users\Simon\Desktop\AutoClickUp> python main.py
Traceback (most recent call last):
File "main.py", line 5, in
for task in client.get_tasks(LIST_ID):
File "C:\Users\Simon\AppData\Local\Programs\Python\Python38\lib\site-packages\clickupython\client.py", line 631, in get_tasks
return models.Tasks.build_tasks(fetched_tasks)
File "C:\Users\Simon\AppData\Local\Programs\Python\Python38\lib\site-packages\clickupython\models.py", line 704, in build_tasks
return Tasks(**self)
File "pydantic\main.py", line 406, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 37 validation errors for Tasks
tasks -> 0 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 0 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 0 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 1 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 1 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 2 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 2 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 2 -> custom_fields -> 1 -> value
str type expected (type=type_error.str)
tasks -> 2 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 3 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 3 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 4 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 4 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 5 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 5 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 5 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 6 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 6 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 6 -> custom_fields -> 1 -> value
str type expected (type=type_error.str)
tasks -> 6 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 7 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 7 -> custom_fields -> 1 -> value
str type expected (type=type_error.str)
tasks -> 7 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 8 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 8 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 8 -> custom_fields -> 1 -> value
str type expected (type=type_error.str)
tasks -> 8 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 9 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 9 -> custom_fields -> 1 -> value
str type expected (type=type_error.str)
tasks -> 9 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 10 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 10 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 10 -> custom_fields -> 1 -> value
str type expected (type=type_error.str)
tasks -> 10 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
tasks -> 11 -> custom_fields -> 0 -> value
str type expected (type=type_error.str)
tasks -> 11 -> custom_fields -> 1 -> value
str type expected (type=type_error.str)
tasks -> 11 -> custom_fields -> 2 -> value
str type expected (type=type_error.str)
This is my code and I got Team authorization error:
c = client.ClickUpClient(API_KEY)
tasks= c.get_tasks('90060136990')
and the error is :
ClickupClientError Traceback (most recent call last)
Cell In[21], line 1
----> 1 lists = c.get_tasks('90060136990')
2 lists
File ~\.conda\envs\ml\lib\site-packages\clickupython\client.py:629, in ClickUpClient.get_tasks(self, list_id, archived, page, order_by, reverse, subtasks, statuses, include_closed, assignees, due_date_gt, due_date_lt, date_created_gt, date_created_lt, date_updated_gt, date_updated_lt)
626 joined_url = f"task?{'&'.join(supplied_values)}"
628 model = "list/"
--> 629 fetched_tasks = self.__get_request(model, list_id, joined_url)
630 if fetched_tasks:
631 return models.Tasks.build_tasks(fetched_tasks)
File ~\.conda\envs\ml\lib\site-packages\clickupython\client.py:65, in ClickUpClient.__get_request(self, model, *additionalpath)
61 raise exceptions.ClickupClientError(
62 "Rate limit exceeded", response.status_code
63 )
64 if response.status_code in [401, 400, 404]:
---> 65 raise exceptions.ClickupClientError(
66 response_json["err"], response.status_code
67 )
68 if response.ok:
69 return response_json
ClickupClientError: (401) Team not authorized
When fetching tasks as below I'm getting validation errors for the priority. The model is expecting an int, but it's a Prority object. This is with v1.0.4 on Python 3.9.7
Looking at the model code the Priority class appears to be defined twice, and sometimes refers to int.
>>> tasks = []
>>> for list in lists:
... tasks.extend(clickup.get_tasks(list.id, subtasks=True, include_closed=True))
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "D:\home\adurant\dev\clickup2gitlab\.venv\lib\site-packages\clickupython\client.py", line 631, in get_tasks
return models.Tasks.build_tasks(fetched_tasks)
File "D:\home\adurant\dev\clickup2gitlab\.venv\lib\site-packages\clickupython\models.py", line 703, in build_tasks
return Tasks(**self)
File "pydantic\main.py", line 406, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 4 validation errors for Tasks
tasks -> 9 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 14 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 17 -> priority
value is not a valid integer (type=type_error.integer)
tasks -> 32 -> priority
value is not a valid integer (type=type_error.integer)
The options object within the TypeConfig is where you get the labels that map to the values for custom fields - they're currently omitted from this model.
Seeing some pydantic errors related to .get_teams() similar to this issue
File "/usr/local/lib/python3.9/site-packages/clickupython/models.py", line 777, in build_teams
return Teams(**self)
File "pydantic/main.py", line 406, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 5 validation errors for Teams
teams -> 0 -> members -> 845 -> user -> custom_role
value is not None (type=type_error.not_none)
teams -> 0 -> members -> 871 -> user -> custom_role
value is not None (type=type_error.not_none)
teams -> 0 -> members -> 923 -> user -> custom_role
value is not None (type=type_error.not_none)
teams -> 0 -> members -> 1023 -> user -> custom_role
value is not None (type=type_error.not_none)
teams -> 0 -> members -> 1075 -> user -> custom_role
value is not None (type=type_error.not_none)
Hello,
Just wondering if there will be support to update a custom field for a task.
Thanks!
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
Can you please support the clickup docs feature?
I assume I'll want to create, update, delete a document?
Create - either from "text" or upload a file
When I set Priority in Clickup dashboard (e.g. High), I get this error
Traceback (most recent call last):
File "C:\PROJECT\Clickup\main.py", line 29, in main
click_up_client.fetch_data()
File "C:\PROJECT\Clickup\request_manager\clickup\client.py", line 40, in fetch_data
tasks = c.get_tasks(self.list_id, include_closed=True)
File "C:\Users\x\.conda\envs\general\lib\site-packages\clickupython\client.py", line 631, in get_tasks
return models.Tasks.build_tasks(fetched_tasks)
File "C:\Users\x\.conda\envs\general\lib\site-packages\clickupython\models.py", line 703, in build_tasks
return Tasks(**self)
File "pydantic\main.py", line 406, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Tasks
tasks -> 2 -> priority
value is not a valid integer (type=type_error.integer)
This is a part of the result as json from postman and clickup api
"watchers": [],
"checklists": [],
"tags": [],
"parent": null,
"priority": {
"color": "#f8ae00",
"id": "2",
"orderindex": "2",
"priority": "high"
},
as you see, the Priority is a JSON object, not an int.
So what is the solution?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.