mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Altair visualization fails with Altair v5+ due to removed `infer_vegalite_type_for_pandas`

Open souro26 opened this issue 10 months ago • 0 comments

Describe the bug

The Altair-based visualization component uses alt.utils.infer_vegalite_type_for_pandas, which was removed in Altair v5+. As a result, visualization-related tests fail with an AttributeError on current Altair versions.

Expected behavior

Altair-based visualizations and related tests should work correctly with current Altair versions (v5+), without raising errors due to deprecated or removed APIs.

To Reproduce

  1. Install Mesa with a recent version of Altair (v5+)
  2. Run the visualization test suite: pytest tests/visualization/
  3. The test test_call_space_drawer_full fails with: AttributeError: module 'altair.utils' has no attribute 'infer_vegalite_type_for_pandas'

This error originates from the Altair-based space visualization component when constructing tooltips.

Additional context

This appears to be caused by dependency drift after upgrading to Altair v5+, where alt.utils.infer_vegalite_type_for_pandas was removed. The affected code path is exercised by Altair-based space visualizations.

souro26 avatar Jan 31 '26 05:01 souro26