socode
socode copied to clipboard
(Occasional) error in hmason()
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.