Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Using Databases in Python Gettin' CRUD-y With It Delete An Entry

Marta P.
Marta P.
2,849 Points

TypeError: delete_entry() takes 0 positional arguments but 1 was given

Hey there, So this is what I get in the shell when I try to delete one of my diary entries. I tried to switch things around a bit and double-checked my script but at this point I am not sure I understand what this TypeError is trying to tell me (as no argument was given?).

Here is my snapshot: http://w.trhou.se/dozo0l7gfi

Thanks!

1 Answer

David Sykes
David Sykes
6,691 Points

You've just missed the argument on your delete entry function.

def delete_entry(entry):

Marta P.
Marta P.
2,849 Points

thanks:) Works great now!