Skip to content

Conversation

@bergsalex
Copy link
Contributor

Fixes a bug where passing None values to ClassifierSettings causes a TypeError when filtering bouts.

Fixes #45

Problem

When using the library API or when behavior configuration dictionaries are missing optional keys, None values could be passed to ClassifierSettings.__init__(). These None values would later cause:

TypeError: '>' not supported between instances of 'NoneType' and 'int'

Solution

Modified ClassifierSettings.init() in src/jabs_postprocess/utils/metadata.py to handle None gracefully:

  • If interpolate is None, use DEFAULT_INTERPOLATE
  • If stitch is None, use DEFAULT_STITCH
  • If min_bout is None, use DEFAULT_MIN_BOUT

@bergsalex bergsalex self-assigned this Nov 11, 2025
@bergsalex bergsalex added the bug Something isn't working label Nov 11, 2025
@bergsalex bergsalex marked this pull request as ready for review November 11, 2025 21:15
@bergsalex bergsalex merged commit c8b4e0d into master Nov 12, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default value for --interpolate-size in generate-tables causes errors

5 participants