Skip to content
Advertisement

Rookie coder: main() missing 1 required positional argument: ‘self’?

This is my first coding class (and first time on the site) and I’m working on a class project. I can’t seem to get my code to run correctly. I’m getting 2 errors and I’ve spent the last 2 hours trying to figure them out. Was wondering if this site would be willing/able to help me out. Code in reply message.

JavaScript
JavaScript

Note: The original code has been removed, but feel free to look at it in the edit history. This is an MRE provided by wjandrea.

Advertisement

Answer

It looks like you indented the last section wrong and added a self parameter to main for some reason (edit: apparently your IDE did that). Your code should look like this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement