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

Module Not Found Error on macOS #3

Open
cyb3rspace opened this issue Aug 13, 2022 · 1 comment
Open

Module Not Found Error on macOS #3

cyb3rspace opened this issue Aug 13, 2022 · 1 comment

Comments

@cyb3rspace
Copy link

cyb3rspace commented Aug 13, 2022

Whenever I execute btlescanner on MacOS, this error message shows up. I've tried pip3 install gibut that doesn't seem to solve the problem. I think Macs might be lacking user interaction with the bluetooth chip through the terminal. Any ideas?

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/btlesniffer", line 33, in <module>
    sys.exit(load_entry_point('btlesniffer==0.2.2+1.g68e4346', 'console_scripts', 'btlesniffer')())
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/btlesniffer", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/metadata/__init__.py", line 162, in load
    module = import_module(match.group('module'))
  File "/Library/Frameworks/Python.framework/Versions/3.10/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 "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/btlesniffer/main.py", line 14, in <module>
    from .sniffer import Sniffer
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/btlesniffer/sniffer.py", line 11, in <module>
    import pydbus
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydbus/__init__.py", line 1, in <module>
    from .bus import SystemBus, SessionBus, connect
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydbus/bus.py", line 1, in <module>
    from gi.repository import Gio
ModuleNotFoundError: No module named 'gi'
@EvanClements
Copy link

EvanClements commented Apr 27, 2023

Fresh install on Android using Termux, and I'm getting the same error:

~
❯ pip install -U git+https://github.com/scipag/btle-sniffer.git
Collecting git+https://github.com/scipag/btle-sniffer.git
  Cloning https://github.com/scipag/btle-sniffer.git to /data/data/com.termux/files/usr/tmp/pip-req-build-5832z31t
  Running command git clone --filter=blob:none --quiet https://github.com/scipag/btle-sniffer.git /data/data/com.termux/files/usr/tmp/pip-req-build-5832z31t
  Resolved https://github.com/scipag/btle-sniffer.git to commit 68e4346ddc094a88a9ee1d2c64fc137504631ca8
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pydbus
  Downloading pydbus-0.6.0-py2.py3-none-any.whl (19 kB)
Building wheels for collected packages: btlesniffer
  Building wheel for btlesniffer (pyproject.toml) ... done
  Created wheel for btlesniffer: filename=btlesniffer-0.2.2+1.g68e4346-py2.py3-none-any.whl size=28250 sha256=8ec5f01726527cf581bf626a77165fc3f247d051e6e60195a304eb27633d861a
  Stored in directory: /data/data/com.termux/files/usr/tmp/pip-ephem-wheel-cache-4c233mzx/wheels/18/49/11/d22e547906080d39b48b207d1c2e3916520d38a2d6fed62c41
Successfully built btlesniffer
Installing collected packages: pydbus, btlesniffer
Successfully installed btlesniffer-0.2.2+1.g68e4346 pydbus-0.6.0

~ 8s
❯ btlesniffer
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/btlesniffer", line 5, in <module>
    from btlesniffer.main import main
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/btlesniffer/main.py", line 14, in <module>
    from .sniffer import Sniffer
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/btlesniffer/sniffer.py", line 11, in <module>
    import pydbus
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pydbus/__init__.py", line 1, in <module>
    from .bus import SystemBus, SessionBus, connect
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pydbus/bus.py", line 1, in <module>
    from gi.repository import Gio
ModuleNotFoundError: No module named 'gi'

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

No branches or pull requests

2 participants