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

Computer Science Introduction to Data Structures Building a Linked List Adding Nodes to a Linked List

Eva Feng
Eva Feng
1,468 Points

Problem with class Node

When I ran the code in this video the console shows TypeError: Node() takes no arguments

Why is that?

1 Answer

Steven Parker
Steven Parker
243,199 Points

It sounds like you may have an error in the definition of the __init__ method in class Node.

If you need help with finding it, share your workspace with us so we can take a look.
Here's a video about sharing a snapshot of your workspace.

Eva Feng
Eva Feng
1,468 Points

Thank you Steven. Here is my workspace. Would be grateful if you can take a look.

https://w.trhou.se/5ohdvscewe

Steven Parker
Steven Parker
243,199 Points

When I run your code in the workspace, I get no errors. Exactly how are you running it?