theengs / explorer

Text user interface to discover BLE devices and show their raw advertisement data and decoded data.
GNU General Public License v3.0
24 stars 4 forks source link

Cannot run on rpi3b+ debian bookworm #22

Open vincele opened 1 year ago

vincele commented 1 year ago

Describe the bug When I try to run it, I get the following error: ImportError: Package 'textual.widgets' has no class 'ScrollView'

To Reproduce

vince@raspberrypi:~/theengs/explorer $ python3 -m venv .venv
vince@raspberrypi:~/theengs/explorer $ . .venv/bin/activate

(.venv) vince@raspberrypi:~/theengs/explorer $ pip install TheengsDecoder textual bluetooth-numbers humanize
Collecting TheengsDecoder
  Using cached TheengsDecoder-1.5.0-cp311-cp311-linux_aarch64.whl
Collecting textual
  Using cached textual-0.27.0-py3-none-any.whl (413 kB)
Collecting bluetooth-numbers
  Using cached bluetooth_numbers-1.1.0-py3-none-any.whl (467 kB)
Collecting humanize
  Using cached humanize-4.6.0-py3-none-any.whl (109 kB)
Collecting importlib-metadata>=4.11.3
  Using cached importlib_metadata-6.6.0-py3-none-any.whl (22 kB)
Collecting markdown-it-py[linkify,plugins]<3.0.0,>=2.1.0
  Using cached markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
Collecting rich>=13.3.3
  Using cached rich-13.4.2-py3-none-any.whl (239 kB)
Collecting typing-extensions<5.0.0,>=4.4.0
  Using cached typing_extensions-4.6.3-py3-none-any.whl (31 kB)
Collecting zipp>=0.5
  Using cached zipp-3.15.0-py3-none-any.whl (6.8 kB)
Collecting mdurl~=0.1
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting linkify-it-py<3,>=1
  Using cached linkify_it_py-2.0.2-py3-none-any.whl (19 kB)
Collecting mdit-py-plugins
  Using cached mdit_py_plugins-0.4.0-py3-none-any.whl (54 kB)
Collecting pygments<3.0.0,>=2.13.0
  Using cached Pygments-2.15.1-py3-none-any.whl (1.1 MB)
Collecting uc-micro-py
  Using cached uc_micro_py-1.0.2-py3-none-any.whl (6.2 kB)
Installing collected packages: TheengsDecoder, zipp, uc-micro-py, typing-extensions, pygments, mdurl, humanize, bluetooth-numbers, markdown-it-py, linkify-it-py, importlib-metadata, rich, mdit-py-plugins, textual
Successfully installed TheengsDecoder-1.5.0 bluetooth-numbers-1.1.0 humanize-4.6.0 importlib-metadata-6.6.0 linkify-it-py-2.0.2 markdown-it-py-2.2.0 mdit-py-plugins-0.4.0 mdurl-0.1.2 pygments-2.15.1 rich-13.4.2 textual-0.27.0 typing-extensions-4.6.3 uc-micro-py-1.0.2 zipp-3.15.0

(.venv) vince@raspberrypi:~/theengs/explorer $ python3 TheengsExplorer/__init__.py
Traceback (most recent call last):
  File "/home/vince/theengs/explorer/TheengsExplorer/__init__.py", line 24, in <module>
    from bleak import BleakScanner
ModuleNotFoundError: No module named 'bleak'

(.venv) vince@raspberrypi:~/theengs/explorer $ pip install bleak
Collecting bleak
  Using cached bleak-0.20.2-py3-none-any.whl (135 kB)
Collecting dbus-fast<2.0.0,>=1.83.0
  Using cached dbus_fast-1.86.0-cp311-cp311-manylinux_2_36_aarch64.whl
Installing collected packages: dbus-fast, bleak
Successfully installed bleak-0.20.2 dbus-fast-1.86.0

(.venv) vince@raspberrypi:~/theengs/explorer $ python3 TheengsExplorer/__init__.py
Traceback (most recent call last):
  File "/home/vince/theengs/explorer/TheengsExplorer/__init__.py", line 26, in <module>
    from textual.widgets import Footer, ScrollView
  File "/home/vince/theengs/explorer/.venv/lib/python3.11/site-packages/textual/widgets/__init__.py", line 92, in __getattr__
    raise ImportError(f"Package 'textual.widgets' has no class '{widget_class}'")
ImportError: Package 'textual.widgets' has no class 'ScrollView'

Expected behavior It runs properly

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

(.venv) vince@raspberrypi:~/theengs/explorer $ uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

(.venv) vince@raspberrypi:~/theengs/explorer $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Additional context Add any other context about the problem here.

vincele commented 1 year ago

The README.md may be updated to also list bleak into the list of dependencies.

And then if some specific versions of the requirements are needed (maybe all from latest git repositories), that should be mentionned too.

Is this related to: https://github.com/theengs/explorer/pull/21 ?

koenvervloesem commented 1 year ago

Yes, development has stalled because the code should be changed to follow the newest Textual release like in the PR you mentioned. There was also never an official release of Theengs Explorer because it was still in development. So for now there's no quick fix. If you really want to run Theengs Explorer now, your best bet is to start from PR #21.

vincele commented 1 year ago

OK thanks for the info. I'll give it a try.