vocalpy / crowsetta

A tool to work with any format for annotating vocalizations
https://crowsetta.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
49 stars 3 forks source link

BUG: fresh install results in ImportError / Pandera AttributeError #265

Closed NickleDave closed 3 months ago

NickleDave commented 3 months ago

A fresh install + import of crowsetta right now gives the following error

ImportError while loading conftest '/Users/davidnicholson/Documents/repos/vocalpy/crowsetta/tests/conftest.py'.
tests/__init__.py:1: in <module>
    from .fixtures import *
tests/fixtures/__init__.py:3: in <module>
    from .bbox import *
tests/fixtures/bbox.py:4: in <module>
    import crowsetta
.nox/test-3-10/lib/python3.10/site-packages/crowsetta/__init__.py:21: in <module>
    from . import formats
.nox/test-3-10/lib/python3.10/site-packages/crowsetta/formats/__init__.py:7: in <module>
    from . import bbox, seq
.nox/test-3-10/lib/python3.10/site-packages/crowsetta/formats/bbox/__init__.py:1: in <module>
    from .audbbox import AudBBox
.nox/test-3-10/lib/python3.10/site-packages/crowsetta/formats/bbox/audbbox.py:99: in <module>
    class AudBBoxSchema(pandera.SchemaModel):
E   AttributeError: module 'pandera' has no attribute 'SchemaModel'

I think what happened is that SchemaModel got replaced with DataFrameModel in pandera 0.20.0 so the fix is just to rename SchemaModel throughout

Ralph Peterson reported a related issue with installing vocalpy, where crowsetta threw an ImportError, because of a pandas version that didn't work with numpy 2.0. But I think that might actually have been fixed by pandas/pandera releases in the meantime because I'm not getting the error

https://github.com/vocalpy/vocalpy/issues/173

sammlapp commented 3 months ago

I also experienced this. Is there a temporary workaround, or a release coming up that will have the fix?

sammlapp commented 3 months ago

Downgrading to pandera from 0.20.1 to 0.15.1 worked for me

NickleDave commented 3 months ago

Hi @sammlapp sorry that this is affecting you too.

Is there a temporary workaround, or a release coming up that will have the fix?

I released version 5.0.3 today that should fix it, please let me know if not