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

ModuleNotFoundError: No module named 'disks' #41

Open
yochananmarqos opened this issue Jan 17, 2022 · 4 comments
Open

ModuleNotFoundError: No module named 'disks' #41

yochananmarqos opened this issue Jan 17, 2022 · 4 comments

Comments

@yochananmarqos
Copy link

Running vizex, vizexdf or vizextree all have the same error with 2.1.0:

Traceback (most recent call last):
  File "/usr/bin/vizex", line 33, in <module>
    sys.exit(load_entry_point('vizex==2.1.0', 'console_scripts', 'vizex')())
  File "/usr/bin/vizex", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/cli.py", line 6, in <module>
    from disks import DiskUsage
ModuleNotFoundError: No module named 'disks'

Running the tests with pytest also fails:

===================================== test session starts =====================================
platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1
rootdir: /build/vizex/src/vizex-2.1.0
collected 0 items / 7 errors                                                                  

=========================================== ERRORS ============================================
___________________________ ERROR collecting tests/test_battery.py ____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.0/tests/test_battery.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_battery.py:9: in <module>
    from vizex.vizexdu.battery import Battery
E   ModuleNotFoundError: No module named 'vizex'
____________________________ ERROR collecting tests/test_charts.py ____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.0/tests/test_charts.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_charts.py:12: in <module>
    from vizex.vizexdu.charts import Options, Chart, HorizontalBarChart
E   ModuleNotFoundError: No module named 'vizex'
_____________________________ ERROR collecting tests/test_cli.py ______________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.0/tests/test_cli.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_cli.py:14: in <module>
    from cli import dirs_files, disk_usage
E   ModuleNotFoundError: No module named 'cli'
________________________ ERROR collecting tests/test_decorateddata.py _________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.0/tests/test_decorateddata.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_decorateddata.py:10: in <module>
    from vizex.tools import DecoratedData
E   ModuleNotFoundError: No module named 'vizex'
_____________________________ ERROR collecting tests/test_disk.py _____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.0/tests/test_disk.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_disk.py:14: in <module>
    from vizex.vizexdu.charts import Options
E   ModuleNotFoundError: No module named 'vizex'
____________________________ ERROR collecting tests/test_files.py _____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.0/tests/test_files.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_files.py:11: in <module>
    from vizex.vizexdf.files import DirectoryFiles
E   ModuleNotFoundError: No module named 'vizex'
____________________________ ERROR collecting tests/test_tools.py _____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.0/tests/test_tools.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_tools.py:18: in <module>
    from vizex.tools import save_to_csv, save_to_json
E   ModuleNotFoundError: No module named 'vizex'
=================================== short test summary info ===================================
ERROR tests/test_battery.py
ERROR tests/test_charts.py
ERROR tests/test_cli.py
ERROR tests/test_decorateddata.py
ERROR tests/test_disk.py
ERROR tests/test_files.py
ERROR tests/test_tools.py
!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 7 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================== 7 errors in 0.09s ======================================
@bexxmodd
Copy link
Owner

@yochananmarqos thanks for reporting! There was issue with properly defining library paths which is corrected now and it should work propelry with v2.1.1c release

@yochananmarqos
Copy link
Author

2.1.1c works now, however the tests still fail:

===================================== test session starts =====================================
platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1
rootdir: /build/vizex/src/vizex-2.1.1c
collected 0 items / 7 errors                                                                  

=========================================== ERRORS ============================================
___________________________ ERROR collecting tests/test_battery.py ____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.1c/tests/test_battery.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_battery.py:9: in <module>
    from vizexdu.battery import Battery
E   ModuleNotFoundError: No module named 'vizexdu'
____________________________ ERROR collecting tests/test_charts.py ____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.1c/tests/test_charts.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_charts.py:12: in <module>
    from vizexdu.charts import Options, Chart, HorizontalBarChart
E   ModuleNotFoundError: No module named 'vizexdu'
_____________________________ ERROR collecting tests/test_cli.py ______________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.1c/tests/test_cli.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_cli.py:14: in <module>
    from cli import dirs_files, disk_usage
E   ModuleNotFoundError: No module named 'cli'
________________________ ERROR collecting tests/test_decorateddata.py _________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.1c/tests/test_decorateddata.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_decorateddata.py:10: in <module>
    from tools import DecoratedData
E   ModuleNotFoundError: No module named 'tools'
_____________________________ ERROR collecting tests/test_disk.py _____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.1c/tests/test_disk.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_disk.py:13: in <module>
    from vizexdu.charts import Options
E   ModuleNotFoundError: No module named 'vizexdu'
____________________________ ERROR collecting tests/test_files.py _____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.1c/tests/test_files.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_files.py:11: in <module>
    from vizexdf.files import DirectoryFiles
E   ModuleNotFoundError: No module named 'vizexdf'
____________________________ ERROR collecting tests/test_tools.py _____________________________
ImportError while importing test module '/build/vizex/src/vizex-2.1.1c/tests/test_tools.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_tools.py:18: in <module>
    from tools import save_to_csv, save_to_json
E   ModuleNotFoundError: No module named 'tools'
=================================== short test summary info ===================================
ERROR tests/test_battery.py
ERROR tests/test_charts.py
ERROR tests/test_cli.py
ERROR tests/test_decorateddata.py
ERROR tests/test_disk.py
ERROR tests/test_files.py
ERROR tests/test_tools.py
!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 7 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================== 7 errors in 0.09s ======================================

@bexxmodd
Copy link
Owner

jeez...

can you tell me how you run tests?

@yochananmarqos
Copy link
Author

I'm just running pytest.

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