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 to run: ModuleNotFoundError: No module named 'utils' #3914

Open
1 of 4 tasks
yurivict opened this issue Oct 6, 2024 · 3 comments
Open
1 of 4 tasks

Tests fail to run: ModuleNotFoundError: No module named 'utils' #3914

yurivict opened this issue Oct 6, 2024 · 3 comments

Comments

@yurivict
Copy link
Contributor

yurivict commented Oct 6, 2024

Summary

PyTest fails:

========================================================================================== ERRORS ===========================================================================================
______________________________________________________________ ERROR collecting demos/offline_ivf/tests/test_iterate_input.py _______________________________________________________________
ImportError while importing test module '/usr/ports/math/py-faiss/work-py311/faiss-1.9.0/demos/offline_ivf/tests/test_iterate_input.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.11/site-packages/_pytest/python.py:520: in importtestmodule
    mod = import_path(
/usr/local/lib/python3.11/site-packages/_pytest/pathlib.py:584: in import_path
    importlib.import_module(module_name)
/usr/local/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/local/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
demos/offline_ivf/tests/test_iterate_input.py:8: in <module>
    from utils import load_config
E   ModuleNotFoundError: No module named 'utils'
_______________________________________________________________ ERROR collecting demos/offline_ivf/tests/test_offline_ivf.py ________________________________________________________________
ImportError while importing test module '/usr/ports/math/py-faiss/work-py311/faiss-1.9.0/demos/offline_ivf/tests/test_offline_ivf.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.11/site-packages/_pytest/python.py:520: in importtestmodule
    mod = import_path(
/usr/local/lib/python3.11/site-packages/_pytest/pathlib.py:584: in import_path
    importlib.import_module(module_name)
/usr/local/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/local/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
demos/offline_ivf/tests/test_offline_ivf.py:7: in <module>
    from utils import load_config
E   ModuleNotFoundError: No module named 'utils'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 2 errors in 3.38s =====================================================================================
*** Error code 2

Platform

OS: FreeBSD 14.1

Faiss version: 1.9.0

Running on:

  • CPU
  • GPU

Interface:

  • C++
  • Python
@ramilbakhshyiev
Copy link
Contributor

Hi @yurivict, is this related to your other issue #3913?

@yurivict
Copy link
Contributor Author

yurivict commented Oct 7, 2024

[...] is this related to your other issue #3913?

No, these two issues are different.

@shiwanghua
Copy link

show the file structure tree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants