Skip to content

Instantly share code, notes, and snippets.

@mweinelt
Created December 14, 2023 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mweinelt/790dd633069cee7cda71e36924169df9 to your computer and use it in GitHub Desktop.
Save mweinelt/790dd633069cee7cda71e36924169df9 to your computer and use it in GitHub Desktop.
❯ poetry run pytest
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.11.6, pytest-7.4.3, pluggy-1.0.0
rootdir: /tmp/bleak
plugins: asyncio-0.22.0, cov-3.0.0
asyncio: mode=Mode.STRICT
collected 0 items
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/python.py", line 617, in _importtestmodule
INTERNALERROR> mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/pathlib.py", line 567, in import_path
INTERNALERROR> importlib.import_module(module_name)
INTERNALERROR> File "/nix/store/qp5zys77biz7imbk6yy85q5pdv7qk84j-python3-3.11.6/lib/python3.11/importlib/__init__.py", line 126, in import_module
INTERNALERROR> return _bootstrap._gcd_import(name[level:], package, level)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
INTERNALERROR> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
INTERNALERROR> File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
INTERNALERROR> File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
INTERNALERROR> File "<frozen importlib._bootstrap_external>", line 940, in exec_module
INTERNALERROR> File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
INTERNALERROR> File "/tmp/bleak/bleak/backends/corebluetooth/__init__.py", line 9, in <module>
INTERNALERROR> import objc
INTERNALERROR> ModuleNotFoundError: No module named 'objc'
INTERNALERROR>
INTERNALERROR> The above exception was the direct cause of the following exception:
INTERNALERROR>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/main.py", line 271, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR> config.hook.pytest_collection(session=session)
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/main.py", line 335, in pytest_collection
INTERNALERROR> session.perform_collect()
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/main.py", line 675, in perform_collect
INTERNALERROR> self.items.extend(self.genitems(node))
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/main.py", line 842, in genitems
INTERNALERROR> rep = collect_one_node(node)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/runner.py", line 546, in collect_one_node
INTERNALERROR> ihook.pytest_collectstart(collector=collector)
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/pytest_asyncio/plugin.py", line 552, in pytest_collectstart
INTERNALERROR> marks = get_unpacked_marks(collector.obj, consider_mro=True)
INTERNALERROR> ^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/python.py", line 310, in obj
INTERNALERROR> self._obj = obj = self._getobj()
INTERNALERROR> ^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/python.py", line 528, in _getobj
INTERNALERROR> return self._importtestmodule()
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/home/hexa/.cache/pypoetry/virtualenvs/bleak-bSnE_Rog-py3.11/lib/python3.11/site-packages/_pytest/python.py", line 642, in _importtestmodule
INTERNALERROR> raise self.CollectError(
INTERNALERROR> _pytest.nodes.Collector.CollectError: ImportError while importing test module '/tmp/bleak/bleak/backends/corebluetooth/__init__.py'.
INTERNALERROR> Hint: make sure your test modules/packages have valid Python names.
INTERNALERROR> Traceback:
INTERNALERROR> /nix/store/qp5zys77biz7imbk6yy85q5pdv7qk84j-python3-3.11.6/lib/python3.11/importlib/__init__.py:126: in import_module
INTERNALERROR> return _bootstrap._gcd_import(name[level:], package, level)
INTERNALERROR> bleak/backends/corebluetooth/__init__.py:9: in <module>
INTERNALERROR> import objc
INTERNALERROR> E ModuleNotFoundError: No module named 'objc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment