Troubleshooting Aspose.OMR FOSS for Python

Troubleshooting Aspose.OMR FOSS for Python

Troubleshooting Aspose.OMR FOSS for Python

Generation Problems

Generated page is empty or missing an element

An element constructed but never appended to a parent’s Children list is never rendered. Confirm every element (down to the page’s own children) is actually attached to the tree before calling OmrEngine.Generate().

Setting Overflow or LongWordHandling has no visible effect

This release’s render engine does not yet honor these enums — they parse and validate correctly, but overflow behavior is not yet configurable. This is tracked on the upstream roadmap as not-yet-implemented.

SaveAsPdf() raises NotImplementedError

PDF export is not implemented in this release. Use Save() (or MemoryGenerationResult.GetImages()) for PNG output instead.

Recognition Problems

GetAnswer() returns an empty string for a mark that looks filled in

The recognition threshold may be too strict for that mark. Pass -100 to Recognize() for auto-calibration, or call TemplateProcessor.Recalculate(result, threshold) with a looser threshold on the existing result without re-scanning.

FormValidationLogic.Exception never raises, even on a multi-marked question

The check only fires for a question with Multiselect disabled; GlobalPageSettings.Multiselect defaults to enabled. Confirm Multiselect is explicitly turned off for the question you expect to be single-select, then pass FormValidationLogic.Exception to GetTemplateProcessor().

Registering an image in ImageCollection raises on the second call with the same name

ImageCollection is append-only and does not allow duplicate names. Check Contains(name) before calling Add(), or use a unique name per image.

Installation Problems

pip install reports the package is not found

git clone https://github.com/aspose-omr-foss/Aspose.OMR-FOSS-for-Python.git
cd Aspose.OMR-FOSS-for-Python
pip install -e .

Diagnostic Checklist

  • Confirm Python 3.10 or later and that numpy, opencv-python, and Pillow are installed.
  • Confirm every template element is attached to its parent’s Children list.
  • Confirm the recognition threshold matches the scan quality — use -100 for auto-calibration before trying a fixed value.
  • Confirm FormValidationLogic matches the validation behavior you expect (Ignore vs. Exception), and that Multiselect is set the way you expect on the relevant question.

See Also