How to Fix: TypeError: method takes 1 positional argument but 2 were given

· · July 31, 2026, 8:01 p.m.
Summary
This blog post explains the TypeError encountered in Python when a method receives more arguments than expected. It clarifies that the issue arises because methods in Python automatically receive the instance as the first argument, which can lead to confusion for developers when passing arguments. The piece aims to help new Python users understand this key concept in method definitions and calls.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →