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

Tests fail: AttributeError: partially initialized module 'einops' has no attribute '_backends' #27

Closed
yurivict opened this issue Aug 5, 2022 · 4 comments

Comments

@yurivict
Copy link

yurivict commented Aug 5, 2022

collected 140 items / 2 errors                                                                                                                                                               

=========================================================================================== ERRORS ===========================================================================================
_________________________________________________________________ ERROR collecting src/xarray_einstats/tests/test_einops.py __________________________________________________________________
tests/test_einops.py:6: in <module>
    from xarray_einstats.einops import raw_rearrange, raw_reduce, rearrange, reduce, translate_pattern
einops.py:9: in <module>
    import einops
einops.py:407: in <module>
    class DaskBackend(einops._backends.AbstractBackend):  # pylint: disable=protected-access
E   AttributeError: partially initialized module 'einops' has no attribute '_backends' (most likely due to a circular import)
__________________________________________________________________ ERROR collecting src/xarray_einstats/tests/test_numba.py __________________________________________________________________
tests/test_numba.py:6: in <module>
    from xarray_einstats.numba import histogram
numba.py:2: in <module>
    import numba
numba.py:9: in <module>
    @numba.guvectorize(
E   AttributeError: partially initialized module 'numba' has no attribute 'guvectorize' (most likely due to a circular import)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 2 errors in 1.83s ======================================================================================
*** Error code 2

OS: FreeBSD 13.1

@OriolAbril
Copy link
Member

I am trying to reproduce the error but can't manage so far. Are einops and numba installed in that env? How do you run pytest?

@OriolAbril
Copy link
Member

In case it helps, I restructured the testing folder in #28 and added a bit of docs on running the tests locally: https://einstats.python.arviz.org/en/latest/contributing/how_to.html#running-the-test-suite-locally

@OriolAbril
Copy link
Member

Is this still an issue?

@yurivict
Copy link
Author

This isn't an issue any more.

@yurivict yurivict closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants