BAD_CONSTRAINT

CompileSeen in: The editor

What happened

A constraint is a function of the settings that returns True or False. It was not a function of one argument, constraints was not a list, or the function raised an error when it was tried on the defaults.

What to do

Write each constraint as a function of one argument, for example lambda p: p.fast < p.slow, and keep them in a list.

Example

text
strategy.py, line 16: constraint 1 must be a function of one argument, like lambda p: p.fast < p.slow [BAD_CONSTRAINT]

The wording of the message depends on your file, and the code does not. An error stops the file from loading.

Ask about this in the forum