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

Cannot import brute_force_cython_exts while doing tests #145

Open
a11to1n3 opened this issue Apr 17, 2021 · 1 comment
Open

Cannot import brute_force_cython_exts while doing tests #145

a11to1n3 opened this issue Apr 17, 2021 · 1 comment

Comments

@a11to1n3
Copy link

Essentially, the errors are as follows. I have installed the requirements in Python 3.7 with pipenv. The test was run in dev branch. If this is expected, please guide me how to resolve it.

====================================================================== ERRORS ======================================================================= _______________________________________________________ ERROR collecting tests/test_bktree.py _______________________________________________________ ImportError while importing test module '/Users/duypham/Documents/imagededup/tests/test_bktree.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/test_bktree.py:3: in <module> from imagededup.methods.hashing import Hashing imagededup/methods/__init__.py:1: in <module> from .hashing import PHash, AHash, DHash, WHash imagededup/methods/hashing.py:12: in <module> from imagededup.handlers.search.retrieval import HashEval imagededup/handlers/search/retrieval.py:9: in <module> from imagededup.handlers.search.brute_force_cython import BruteForceCython imagededup/handlers/search/brute_force_cython.py:3: in <module> from imagededup.handlers.search import brute_force_cython_exts E ImportError: cannot import name 'brute_force_cython_exts' from 'imagededup.handlers.search' (/Users/duypham/Documents/imagededup/imagededup/handlers/search/__init__.py) ____________________________________________________ ERROR collecting tests/test_brute_force.py _____________________________________________________ ImportError while importing test module '/Users/duypham/Documents/imagededup/tests/test_brute_force.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/test_brute_force.py:4: in <module> from imagededup.methods.hashing import Hashing imagededup/methods/__init__.py:1: in <module> from .hashing import PHash, AHash, DHash, WHash imagededup/methods/hashing.py:12: in <module> from imagededup.handlers.search.retrieval import HashEval imagededup/handlers/search/retrieval.py:9: in <module> from imagededup.handlers.search.brute_force_cython import BruteForceCython imagededup/handlers/search/brute_force_cython.py:3: in <module> from imagededup.handlers.search import brute_force_cython_exts E ImportError: cannot import name 'brute_force_cython_exts' from 'imagededup.handlers.search' (/Users/duypham/Documents/imagededup/imagededup/handlers/search/__init__.py) _________________________________________________ ERROR collecting tests/test_brute_force_cython.py _________________________________________________ ImportError while importing test module '/Users/duypham/Documents/imagededup/tests/test_brute_force_cython.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/test_brute_force_cython.py:3: in <module> from imagededup.handlers.search.brute_force_cython import BruteForceCython imagededup/handlers/search/brute_force_cython.py:3: in <module> from imagededup.handlers.search import brute_force_cython_exts E ImportError: cannot import name 'brute_force_cython_exts' from 'imagededup.handlers.search' (/Users/duypham/Documents/imagededup/imagededup/handlers/search/__init__.py) ________________________________________________________ ERROR collecting tests/test_cnn.py _________________________________________________________ ImportError while importing test module '/Users/duypham/Documents/imagededup/tests/test_cnn.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/test_cnn.py:10: in <module> from imagededup.methods.cnn import CNN imagededup/methods/__init__.py:1: in <module> from .hashing import PHash, AHash, DHash, WHash imagededup/methods/hashing.py:12: in <module> from imagededup.handlers.search.retrieval import HashEval imagededup/handlers/search/retrieval.py:9: in <module> from imagededup.handlers.search.brute_force_cython import BruteForceCython imagededup/handlers/search/brute_force_cython.py:3: in <module> from imagededup.handlers.search import brute_force_cython_exts E ImportError: cannot import name 'brute_force_cython_exts' from 'imagededup.handlers.search' (/Users/duypham/Documents/imagededup/imagededup/handlers/search/__init__.py) ______________________________________________________ ERROR collecting tests/test_hashing.py _______________________________________________________ ImportError while importing test module '/Users/duypham/Documents/imagededup/tests/test_hashing.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/test_hashing.py:9: in <module> from imagededup.methods.hashing import Hashing, PHash, DHash, AHash, WHash imagededup/methods/__init__.py:1: in <module> from .hashing import PHash, AHash, DHash, WHash imagededup/methods/hashing.py:12: in <module> from imagededup.handlers.search.retrieval import HashEval imagededup/handlers/search/retrieval.py:9: in <module> from imagededup.handlers.search.brute_force_cython import BruteForceCython imagededup/handlers/search/brute_force_cython.py:3: in <module> from imagededup.handlers.search import brute_force_cython_exts E ImportError: cannot import name 'brute_force_cython_exts' from 'imagededup.handlers.search' (/Users/duypham/Documents/imagededup/imagededup/handlers/search/__init__.py) _____________________________________________________ ERROR collecting tests/test_retrieval.py ______________________________________________________ ImportError while importing test module '/Users/duypham/Documents/imagededup/tests/test_retrieval.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/test_retrieval.py:6: in <module> from imagededup.handlers.search.retrieval import ( imagededup/handlers/search/retrieval.py:9: in <module> from imagededup.handlers.search.brute_force_cython import BruteForceCython imagededup/handlers/search/brute_force_cython.py:3: in <module> from imagededup.handlers.search import brute_force_cython_exts E ImportError: cannot import name 'brute_force_cython_exts' from 'imagededup.handlers.search' (/Users/duypham/Documents/imagededup/imagededup/handlers/search/__init__.py)

@tanujjain
Copy link
Collaborator

Could you check it out on the newer release of imagededup? We run tests on different platforms as part of building the package, so the error isn't expected.

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