Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when editing a todo #79

Closed
pfertyk opened this issue Feb 2, 2017 · 4 comments
Closed

Error when editing a todo #79

pfertyk opened this issue Feb 2, 2017 · 4 comments
Labels

Comments

@pfertyk
Copy link
Contributor

pfertyk commented Feb 2, 2017

I just upgraded todoman (current version: 2.0.1). When I edit a todo, I get this error:

Traceback (most recent call last):
  File "/home/pawel/.local/bin/todo", line 11, in <module>
    sys.exit(cli())
  File "/home/pawel/.local/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/pawel/.local/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/pawel/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pawel/.local/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pawel/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/pawel/.local/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/pawel/.local/lib/python3.5/site-packages/todoman/cli.py", line 62, in command_wrap
    return command(*a, **kw)
  File "/home/pawel/.local/lib/python3.5/site-packages/todoman/cli.py", line 192, in edit
    click.echo(ctx.obj['formatter'].detailed(todo, database))
TypeError: detailed() takes 2 positional arguments but 3 were given

The error occurs when I click 'Save'. The todo is edited anyway (in my case I was removing the due date), so I guess it's not an urgent problem. Still, showing an error after a correctly finished operation is something that could be fixed :)

I also noticed that the new version of todoman displays the todos with unordered ids (it used to be 1, 2, 3, ..., now it is 2, 30, 15, ...). Also, the ids do not change if I display just one of the lists (they used to start with 1 regardless if I displayed one list or all of them). Was this change intentional of is it another bug? It seems reasonable, but I want to make sure.

@WhyNotHugo
Copy link
Member

Persistent ids are intentional. They are unordered because the exact order of your todos depends on lists/sorting, so it would be impossible for the to be sorted and persistent.

Persistent ids should reduce mistakes when working on multiple terminals, and also have some technical advantages for us.

@WhyNotHugo
Copy link
Member

Fixed via a73fc28, and pushed as v2.0.2.

@pfertyk
Copy link
Contributor Author

pfertyk commented Feb 2, 2017

That was fast, thanks!

@WhyNotHugo
Copy link
Member

No problem. Sorry por pushing such a blatantly broken release.

@untitaker untitaker added the bug label Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants