RuntimeError: Could Not Complete Request
doGior opened this issue · comments
Problem
Hi, about a week ago I made a bot with this API and the bot worked properly, but saturday I modified it and interrupted it with CTRL+C and then, when I tried to run it again, it didn't work.
I commented out everything leaving only these two lines , but it still crashes
ticktick_client = api.TickTickClient(email, password)
ticktick_client.task.create("Test")
This is the TraceBack
Traceback (most recent call last):
File "D:\Documenti\Progetti\Python\BotCompiti\BotCompiti.py", line 44, in <module>
ticktick_client.task.create("Prova")
File "D:\Documenti\Progetti\Python\BotCompiti\venv\lib\site-packages\ticktick\managers\check_logged_in.py", line 13, in call
return func(self, *args, **kwargs)
File "D:\Documenti\Progetti\Python\BotCompiti\venv\lib\site-packages\ticktick\managers\tasks.py", line 333, in create
return self._client.task.update(obj)
File "D:\Documenti\Progetti\Python\BotCompiti\venv\lib\site-packages\ticktick\managers\check_logged_in.py", line 13, in call
return func(self, *args, **kwargs)
File "D:\Documenti\Progetti\Python\BotCompiti\venv\lib\site-packages\ticktick\managers\tasks.py", line 657, in update
response = self._client.http_post(url, json=payload, cookies=self._client.cookies)
File "D:\Documenti\Progetti\Python\BotCompiti\venv\lib\site-packages\ticktick\api.py", line 172, in http_post
self.check_status_code(response, 'Could Not Complete Request')
File "D:\Documenti\Progetti\Python\BotCompiti\venv\lib\site-packages\ticktick\api.py", line 107, in check_status_code
raise RuntimeError(error_message)
RuntimeError: Could Not Complete Request
Useful info
- OS: Windows 10
- Python: 3.9.4
- ticktick-py: 1.0.2
Hello, it does seem that there is a TickTick server side error which is preventing tasks from being created with the current configuration. I will work on a fix, however I can't promise a completion date at this time. The fix might require switching to their open API scheme which will require an OAuth token - and if this is the case the fix will take some time. I am really sorry for the inconvenience!
Here is the link to their very unfinished and limited documentation on their OpenAPI:
Thank you, I'll check it out
I'm having the same issue. And it seems they've walled off their OpenAPI documentation, now. It's too bad because I was using ticktick-py on a daily basis.
I hope all of this is a good sign that they're developing a functional public API.
I am currently working on getting things migrated for their OpenAPI - pending no major roadblocks I should be able to have a stable release out in no more than 2 weeks.
Awesome to hear! Subscribed to this ticket.
Could you please do us a favor and notify here when it's fixed? More than happy to help if you need it.
New update is released. Thank you all for being patient, and please create other issues if there are any other problems or you have new features in mind :)