Skip to content

(Occasional) error in hmason() #323

@havanagrawal

Description

@havanagrawal
Traceback (most recent call last):
  File "socode.py", line 1919, in <module>
    hmason()
  File "socode.py", line 228, in hmason
    exec random.choice(re.findall('def (.*):', socode_source))
  File "<string>", line 1, in <module>
  File "socode.py", line 830, in GeneralZero
    if inspect.isfunction(obj)])()
TypeError: nathanathan() takes at least 1 argument (0 given)

It is because this method picks out a random method from the socode.py file, and executes it. The problem is that it executes it without any args, and if it picks up a method that requires args, you get the above exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions