question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Sequence numbers are deprecated"

See original GitHub issue

My code:

from datetime import datetime
from pytodoist import todoist
from pytodoist.api import TodoistAPI
from credentials import *

#Setup todoists
user = todoist.login(user, password)

#Setup datetime objects
today_object = datetime.today().date()

#API setup
api = TodoistAPI()
response = api.login('##EMAIL##', '##PASSWORD##')
user_info = response.json()
user_api_token = user_info['token']

def copy_due(inp, outp):
    """
    Takes arguments
    inp: Input project
    outp: Output project

    and copies due tasks from inp to outp
    """
    #Setup projects
    output_id = user.get_project(outp).id
    due_tasks = user.get_project(inp).get_uncompleted_tasks()

    for task in due_tasks:
        if task.due_date is not None:
            date_object = datetime.strptime(task.due_date, '%a %d %b %Y %H:%M:%S %z').date()

            if today_object == date_object:
                notes = task.get_notes()

                label_ids = task.labels

                response = api.add_item(user_api_token, task.content, project_id=output_id, priority=task.priority, labels=str(label_ids))


                task.complete()

copy_due("Recurrent-tickler", "Solitary-actionable")
#copy_due("Tickler", "Solitary-actionable")

The error:

Traceback (most recent call last):
  File "/Volumes/home/Work/Tickler-Todoist/test.py", line 44, in <module>
    copy_due("Recurrent-tickler", "Solitary-actionable")
  File "/Volumes/home/Work/Tickler-Todoist/test.py", line 42, in copy_due
    task.complete()
  File "/usr/local/lib/python3.5/site-packages/pytodoist/todoist.py", line 1293, in complete
    _perform_command(self.project.owner, 'item_close', args)
  File "/usr/local/lib/python3.5/site-packages/pytodoist/todoist.py", line 200, in _perform_command
    _fail_if_contains_errors(response, command_uuid)
  File "/usr/local/lib/python3.5/site-packages/pytodoist/todoist.py", line 175, in _fail_if_contains_errors
    raise RequestError(response)
pytodoist.todoist.RequestError: {"error_tag":"ACCESS_DENIED","error_code":101,"http_code":403,"error_extra":{},"error":"Sequence numbers are deprecated. Please upgrade your client to switch to sync tokens or contact support at https:\/\/support.todoist.com. Deprecated functionality will be  completely disabled on 13 Feb 2016 at 9:00:00 GMT"}

The code has been working just fine for the last ~6 months – hope you have time to look at it! 👍

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Gareecommented, Feb 25, 2017

@ryqiem @amccaugh I have released a new version that uses version 7 of the Todoist sync API.

Please upgrade the package and let me know if it works or if you have any issues.

$ pip install pytodoist --upgrade

Thanks for reporting the issue.

0reactions
MartinBernstorffcommented, Feb 28, 2017

After fixing a slight change in the task attributes from due_date due_date_UTC, it’s working awesome here as well!

You’re the man, @Garee!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is the sequence number in Header message deprecated
Hi all, At the moment I am trying to understand whether the sequence number in the ROS header message is now deprecated.
Read more >
NCBI is Phasing Out Sequence GIs - Here's What You Need to ...
You may have heard that NCBI is changing the way we handle GI numbers for sequence records in September 2016. Well, you heard...
Read more >
deprecated SequenceHiLoGenerator sequence-based id ...
deprecation : HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator; use org.hibernate.id.enhanced.
Read more >
Locktime and Sequence Number - Dash Core
Sequence numbers were meant to allow multiple signers to agree to update a transaction; when they finished updating the transaction, they could agree...
Read more >
SyntaxError: "0"-prefixed octal literals and octal escape seq ...
Octal literals and octal escape sequences are deprecated and will throw a SyntaxError in strict mode. ... Valid octal numbers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found