Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
NickleDave opened this issue Jul 1, 2024 · 3 comments · Fixed by #266
Closed

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

NickleDave opened this issue Jul 1, 2024 · 3 comments · Fixed by #266
Assignees
Labels
BUG: bug Something isn't working

Comments

@NickleDave
Copy link
Collaborator

NickleDave commented Jul 1, 2024

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

vocalpy/vocalpy#173

@sammlapp
Copy link

sammlapp commented Jul 2, 2024

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

@sammlapp
Copy link

sammlapp commented Jul 2, 2024

Downgrading to pandera from 0.20.1 to 0.15.1 worked for me

@NickleDave
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants